mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: "'Paul Burton'" <paul.burton@imgtec.com>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
	Ralf Baechle <ralf@linux-mips.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 6/6] net: pch_gbe: Allow longer for resets
Date: Wed, 3 Feb 2016 16:51:34 +0000	[thread overview]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D1CCD57CD@AcuExch.aculab.com> (raw)
In-Reply-To: <1454500964-6256-7-git-send-email-paul.burton@imgtec.com>

From: Paul Burton
> Sent: 03 February 2016 12:03
> Resets of the EG20T MAC on the MIPS Boston development board take longer
> than the 1000 loops that pch_gbe_wait_clr_bit was performing. Bump up
> the number of loops.
...
> diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-
> semi/pch_gbe/pch_gbe_main.c
> index 00ef83c..87994d2 100644
> --- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> +++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
> @@ -321,7 +321,7 @@ static void pch_gbe_wait_clr_bit(void *reg, u32 bit)
>  	u32 tmp;
> 
>  	/* wait busy */
> -	tmp = 1000;
> +	tmp = 10000;
>  	while ((ioread32(reg) & bit) && --tmp)
>  		cpu_relax();
>  	if (!tmp)

Why not sleep for (say) 100us ?
That'll stop the loop depending on the cpu speed.

	David

      reply	other threads:[~2016-02-03 16:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03 12:02 [PATCH v2 0/6] pch_gbe fixes for Imagination Technologies MIPS Boston Paul Burton
2016-02-03 12:02 ` [PATCH v2 1/6] net: pch_gbe: Allow build on MIPS platforms Paul Burton
2016-02-03 12:02 ` [PATCH v2 2/6] net: pch_gbe: Mark Minnow PHY reset GPIO active low Paul Burton
2016-02-03 12:02 ` [PATCH v2 3/6] net: pch_gbe: Pull PHY GPIO handling out of Minnow code Paul Burton
2016-02-03 14:36   ` kbuild test robot
2016-02-03 12:02 ` [PATCH v2 4/6] net: pch_gbe: Always reset PHY along with MAC Paul Burton
2016-02-03 12:02 ` [PATCH v2 5/6] net: pch_gbe: Add device tree support Paul Burton
2016-02-03 12:02 ` [PATCH v2 6/6] net: pch_gbe: Allow longer for resets Paul Burton
2016-02-03 16:51   ` David Laight [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=063D6719AE5E284EB5DD2968C1650D6D1CCD57CD@AcuExch.aculab.com \
    --to=david.laight@aculab.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=netdev@vger.kernel.org \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®