Skip to content

Commit

Permalink
smsc95xx: fix reset check
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rabin Vincent authored and David S. Miller committed May 2, 2011
1 parent 6fdbab9 commit d946092
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/smsc95xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,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");
Expand Down

0 comments on commit d946092

Please sign in to comment.