diff options
| -rw-r--r-- | drivers/net/phy/phy_device.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index f794ff3a10c2..2a2aaa5f3e74 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
| @@ -1739,13 +1739,17 @@ EXPORT_SYMBOL(genphy_update_link); | |||
| 1739 | */ | 1739 | */ |
| 1740 | int genphy_read_status(struct phy_device *phydev) | 1740 | int genphy_read_status(struct phy_device *phydev) |
| 1741 | { | 1741 | { |
| 1742 | int adv, lpa, lpagb, err; | 1742 | int adv, lpa, lpagb, err, old_link = phydev->link; |
| 1743 | 1743 | ||
| 1744 | /* Update the link, but return if there was an error */ | 1744 | /* Update the link, but return if there was an error */ |
| 1745 | err = genphy_update_link(phydev); | 1745 | err = genphy_update_link(phydev); |
| 1746 | if (err) | 1746 | if (err) |
| 1747 | return err; | 1747 | return err; |
| 1748 | 1748 | ||
| 1749 | /* why bother the PHY if nothing can have changed */ | ||
| 1750 | if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link) | ||
| 1751 | return 0; | ||
| 1752 | |||
| 1749 | phydev->speed = SPEED_UNKNOWN; | 1753 | phydev->speed = SPEED_UNKNOWN; |
| 1750 | phydev->duplex = DUPLEX_UNKNOWN; | 1754 | phydev->duplex = DUPLEX_UNKNOWN; |
| 1751 | phydev->pause = 0; | 1755 | phydev->pause = 0; |
