提交 d9460920 编写于 作者: R Rabin Vincent 提交者: David S. Miller

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: NRabin Vincent <rabin@rab.in>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6fdbab9d
...@@ -730,7 +730,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev) ...@@ -730,7 +730,7 @@ static int smsc95xx_phy_initialize(struct usbnet *dev)
msleep(10); msleep(10);
bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR); bmcr = smsc95xx_mdio_read(dev->net, dev->mii.phy_id, MII_BMCR);
timeout++; timeout++;
} while ((bmcr & MII_BMCR) && (timeout < 100)); } while ((bmcr & BMCR_RESET) && (timeout < 100));
if (timeout >= 100) { if (timeout >= 100) {
netdev_warn(dev->net, "timeout on PHY Reset"); netdev_warn(dev->net, "timeout on PHY Reset");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册