From: Roel Kluin <roel.kluin@gmail.com>
To: mbizon@freebox.fr, netdev@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] bcm63xx_enet: timeout off by one in do_mdio_op()
Date: Mon, 21 Sep 2009 22:08:48 +0200 [thread overview]
Message-ID: <4AB7DD50.6030409@gmail.com> (raw)
`while (limit-- >= 0)' reaches -2 after the loop upon timeout.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
Small chance to occur, probably.
diff --git a/drivers/net/bcm63xx_enet.c b/drivers/net/bcm63xx_enet.c
index 09d2709..ba29dc3 100644
--- a/drivers/net/bcm63xx_enet.c
+++ b/drivers/net/bcm63xx_enet.c
@@ -90,7 +90,7 @@ static int do_mdio_op(struct bcm_enet_priv *priv, unsigned int data)
if (enet_readl(priv, ENET_IR_REG) & ENET_IR_MII)
break;
udelay(1);
- } while (limit-- >= 0);
+ } while (limit-- > 0);
return (limit < 0) ? 1 : 0;
}
next reply other threads:[~2009-09-21 20:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-21 20:08 Roel Kluin [this message]
2009-09-30 14:01 ` [PATCH] bcm63xx_enet: timeout off by one in do_mdio_op() Maxime Bizon
2009-10-01 3:05 ` David Miller
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=4AB7DD50.6030409@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=mbizon@freebox.fr \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).