diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 707cd28202a3..92c62864b07d 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -2343,13 +2343,12 @@ EXPORT_SYMBOL(genphy_aneg_done); */ int genphy_update_link(struct phy_device *phydev) { - int status = 0, bmcr, i; + int status = 0, bmcr; bmcr = phy_read(phydev, MII_BMCR); if (bmcr < 0) return bmcr; - /* Autoneg is being started, therefore disregard BMSR value and * report link as down. */ @@ -2370,19 +2369,9 @@ int genphy_update_link(struct phy_device *phydev) } /* Read link and autonegotiation status */ - for (i = 0; i < 20; i++) { - status = phy_read(phydev, MII_BMSR); - if (status < 0) - return status; - - if (status & BMSR_LSTATUS) - break; - - cpu_relax(); - } - if (status & BMSR_LSTATUS) - if (i >= 1) - phydev_info(phydev, "link up after multiple reads: %di\n", i); + status = phy_read(phydev, MII_BMSR); + if (status < 0) + return status; done: phydev->link = status & BMSR_LSTATUS ? 1 : 0; phydev->autoneg_complete = status & BMSR_ANEGCOMPLETE ? 1 : 0;