smsc75xx: fix phy init reset loop
authorSteve Glendinning <steve.glendinning@shawell.net>
Mon, 30 Apr 2012 07:56:53 +0000 (07:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 May 2012 01:52:40 +0000 (21:52 -0400)
fix bug in phy_init loop that was ignoring BMCR reset bit, akin to smsc95xx's d946092000698fd204d82a9d239103c656fb63bf

Signed-off-by: Stephane Fillod <fillods@users.sf.net>
Signed-off-by: Steve Glendinning <steve.glendinning@shawell.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/smsc75xx.c

index 1de778527813b9a5c9776c5087718fd6206cd6f5..cc23a589e40f5329e170c3d402b4e8d6a7af5904 100644 (file)
@@ -661,7 +661,7 @@ static int smsc75xx_phy_initialize(struct usbnet *dev)
                bmcr = smsc75xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
                check_warn_return(bmcr, "Error reading 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");