summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/lan78xx.c
diff options
context:
space:
mode:
authorWoojung.Huh@microchip.com <Woojung.Huh@microchip.com>2015-09-16 23:40:39 +0000
committerDavid S. Miller <davem@davemloft.net>2015-09-17 22:15:36 -0700
commit6c595b03b1087f9f18a809ee7ce1a79c746037d5 (patch)
tree9b0e38d7db1c03b2652bef4d750fdbfa332272f8 /drivers/net/usb/lan78xx.c
parentbde6f9ded1bd37ff27a042dcb968e104d92b02c1 (diff)
downloadlinux-6c595b03b1087f9f18a809ee7ce1a79c746037d5.tar.bz2
lan78xx: Check device ready bit (PMT_CTL_READY_) after reset the PHY
Check device ready bit (PMT_CTL_READY_) after reset the PHY. Device may not be ready even if PHY_RST_ is cleared depends on configuration. Signed-off-by: Woojung Huh <woojung.huh@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/lan78xx.c')
-rw-r--r--drivers/net/usb/lan78xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index a39518fc93aa..d0d8790d5d1b 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2002,7 +2002,7 @@ static int lan78xx_reset(struct lan78xx_net *dev)
netdev_warn(dev->net, "timeout waiting for PHY Reset");
return -EIO;
}
- } while (buf & PMT_CTL_PHY_RST_);
+ } while ((buf & PMT_CTL_PHY_RST_) || !(buf & PMT_CTL_READY_));
lan78xx_mii_init(dev);