kernel: bump 4.19 to 4.19.62
[openwrt/openwrt.git] / target / linux / generic / hack-4.19 / 702-phy_add_aneg_done_function.patch
index 85ffa1ac1bfe5fb67c99b89d88d10d05b7a35dcc..9a9097d91f370b8281a1779c64287e9676277fa1 100644 (file)
  
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1506,6 +1506,9 @@ int genphy_update_link(struct phy_device
+@@ -1512,6 +1512,9 @@ int genphy_update_link(struct phy_device
  {
        int status;
  
 +      if (phydev->drv && phydev->drv->update_link)
 +              return phydev->drv->update_link(phydev);
 +
-       /* Do a fake read */
-       status = phy_read(phydev, MII_BMSR);
-       if (status < 0)
+       /* The link state is latched low so that momentary link
+        * drops can be detected. Do not double-read the status
+        * in polling mode to detect such short link drops.