diff mbox

smsc95xx: fix reset check

Message ID 1304188167-18152-1-git-send-email-rabin@rab.in
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Rabin Vincent April 30, 2011, 6:29 p.m. UTC
The reset loop check should check the MII_BMCR register value for
BMCR_RESET rather than for MII_BMCR (the register address, which also
happens to be zero).

Signed-off-by: Rabin Vincent <rabin@rab.in>
---
 drivers/net/usb/smsc95xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller May 2, 2011, 10:51 p.m. UTC | #1
From: Rabin Vincent <rabin@rab.in>
Date: Sat, 30 Apr 2011 23:59:27 +0530

> The reset loop check should check the MII_BMCR register value for
> BMCR_RESET rather than for MII_BMCR (the register address, which also
> happens to be zero).
> 
> Signed-off-by: Rabin Vincent <rabin@rab.in>

Applied, thank you.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index 24f4b37..2b16d54 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -689,7 +689,7 @@  static int smsc95xx_phy_initialize(struct usbnet *dev)
 		msleep(10);
 		bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
 		timeout++;
-	} while ((bmcr & MII_BMCR) && (timeout < 100));
+	} while ((bmcr & BMCR_RESET) && (timeout < 100));
 
 	if (timeout >= 100) {
 		netdev_warn(dev->net, "timeout on PHY Reset");