Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9460920 authored by Rabin Vincent's avatar Rabin Vincent Committed by David S. Miller
Browse files

smsc95xx: fix reset check



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: default avatarRabin Vincent <rabin@rab.in>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6fdbab9d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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");