浏览代码

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>
Woojung.Huh@microchip.com 10 年之前
父节点
当前提交
6c595b03b1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/usb/lan78xx.c

+ 1 - 1
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");
 			netdev_warn(dev->net, "timeout waiting for PHY Reset");
 			return -EIO;
 			return -EIO;
 		}
 		}
-	} while (buf & PMT_CTL_PHY_RST_);
+	} while ((buf & PMT_CTL_PHY_RST_) || !(buf & PMT_CTL_READY_));
 
 
 	lan78xx_mii_init(dev);
 	lan78xx_mii_init(dev);