[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9235D6609DB808459E95D78E17F2E43D557C41@CHN-SV-EXMX02.mchp-main.com>
Date: Thu, 10 Sep 2015 20:48:37 +0000
From: <Woojung.Huh@...rochip.com>
To: <davem@...emloft.net>
CC: <netdev@...r.kernel.org>, <f.fainelli@...il.com>
Subject: [PATCH 1/5] lan78xx: check device ready bit (PMT_CTL_READY_) after
reset 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@...rochip.com>
---
drivers/net/usb/lan78xx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index a39518f..d0d8790 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);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists