All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ftgmac100: Increase reset timeout
@ 2017-07-24  6:59 Benjamin Herrenschmidt
  2017-07-25  0:24 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2017-07-24  6:59 UTC (permalink / raw)
  To: netdev; +Cc: Joel Stanley

We had reports of 50us not being sufficient to reset the MAC,
thus hitting the "Hardware reset failed" error bringing the
interface up on some AST2400 based machines.

This bumps the timeout to 200us.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index b166666128d3..2b17f7023d91 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -125,7 +125,7 @@ static int ftgmac100_reset_mac(struct ftgmac100 *priv, u32 maccr)
 	iowrite32(maccr, priv->base + FTGMAC100_OFFSET_MACCR);
 	iowrite32(maccr | FTGMAC100_MACCR_SW_RST,
 		  priv->base + FTGMAC100_OFFSET_MACCR);
-	for (i = 0; i < 50; i++) {
+	for (i = 0; i < 200; i++) {
 		unsigned int maccr;
 
 		maccr = ioread32(priv->base + FTGMAC100_OFFSET_MACCR);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ftgmac100: Increase reset timeout
  2017-07-24  6:59 [PATCH 1/2] ftgmac100: Increase reset timeout Benjamin Herrenschmidt
@ 2017-07-25  0:24 ` David Miller
  0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2017-07-25  0:24 UTC (permalink / raw)
  To: benh; +Cc: netdev, joel.stanley

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Mon, 24 Jul 2017 16:59:01 +1000

> We had reports of 50us not being sufficient to reset the MAC,
> thus hitting the "Hardware reset failed" error bringing the
> interface up on some AST2400 based machines.
> 
> This bumps the timeout to 200us.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] ftgmac100: Increase reset timeout
       [not found] <20170724065917.5F9AEC6037@b03ledav006.gho.boulder.ibm.com>
@ 2017-07-24 13:09 ` Joel Stanley
  0 siblings, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2017-07-24 13:09 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: netdev, Joel Stanley

On Mon, Jul 24, 2017 at 4:29 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> We had reports of 50us not being sufficient to reset the MAC,
> thus hitting the "Hardware reset failed" error bringing the
> interface up on some AST2400 based machines.
>
> This bumps the timeout to 200us.
>
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

I gave this a spin on the problematic hardware, as well as a few other
machines. Looks good, thanks Ben.

Tested-by: Joel Stanley <joel@jms.id.au>

Cheers,

Joel


> ---
>  drivers/net/ethernet/faraday/ftgmac100.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
> index b166666128d3..2b17f7023d91 100644
> --- a/drivers/net/ethernet/faraday/ftgmac100.c
> +++ b/drivers/net/ethernet/faraday/ftgmac100.c
> @@ -125,7 +125,7 @@ static int ftgmac100_reset_mac(struct ftgmac100 *priv, u32 maccr)
>         iowrite32(maccr, priv->base + FTGMAC100_OFFSET_MACCR);
>         iowrite32(maccr | FTGMAC100_MACCR_SW_RST,
>                   priv->base + FTGMAC100_OFFSET_MACCR);
> -       for (i = 0; i < 50; i++) {
> +       for (i = 0; i < 200; i++) {
>                 unsigned int maccr;
>
>                 maccr = ioread32(priv->base + FTGMAC100_OFFSET_MACCR);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-25  0:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24  6:59 [PATCH 1/2] ftgmac100: Increase reset timeout Benjamin Herrenschmidt
2017-07-25  0:24 ` David Miller
     [not found] <20170724065917.5F9AEC6037@b03ledav006.gho.boulder.ibm.com>
2017-07-24 13:09 ` Joel Stanley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.