|
|
@@ -147,9 +147,15 @@ int genphy_c45_read_link(struct phy_device *phydev, u32 mmd_mask)
|
|
|
mmd_mask &= ~BIT(devad);
|
|
|
|
|
|
/* The link state is latched low so that momentary link
|
|
|
- * drops can be detected. Do not double-read the status
|
|
|
- * register if the link is down.
|
|
|
+ * drops can be detected. Do not double-read the status
|
|
|
+ * in polling mode to detect such short link drops.
|
|
|
*/
|
|
|
+ if (!phy_polling_mode(phydev)) {
|
|
|
+ val = phy_read_mmd(phydev, devad, MDIO_STAT1);
|
|
|
+ if (val < 0)
|
|
|
+ return val;
|
|
|
+ }
|
|
|
+
|
|
|
val = phy_read_mmd(phydev, devad, MDIO_STAT1);
|
|
|
if (val < 0)
|
|
|
return val;
|