net: phy: marvell: don't interpret PHY status unless resolved
Subsystems (3)
PATCH 1/1 net: phy: marvell: don't interpret PHY status unless resolved
Don't attempt to interpret the PHY specific status register unless the PHY is indicating that the resolution is valid.
Reviewed-by Andrew Lunn <[email protected]>
Signed-off-by Russell King <[email protected]>
--- drivers/net/phy/marvell.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/net/phy/marvell.c +5 -0
@@ -1306,6 +1306,9 @@ static int marvell_read_status_page_an(struct phy_device *phydev, } } +if (!(status &MII_M1011_PHY_STATUS_RESOLVED )) +return 0 ; +if (status &MII_M1011_PHY_STATUS_FULLDUPLEX ) phydev->duplex =DUPLEX_FULL ;else
@@ -1365,6 +1368,8 @@ static int marvell_read_status_page(struct phy_device *phydev, int page)linkmode_zero (phydev->lp_advertising); phydev->pause =0 ; phydev->asym_pause =0 ; + phydev->speed =SPEED_UNKNOWN ; + phydev->duplex =DUPLEX_UNKNOWN ;if (phydev->autoneg ==AUTONEG_ENABLE ) err =marvell_read_status_page_an (phydev, fiber, status);
Signature · 1 line
2.20.1
Quoted 5 lines · Russell King
Don't attempt to interpret the PHY specific status register unless the PHY is indicating that the resolution is valid.
Reviewed-by Andrew Lunn <[email protected]>Signed-off-by Russell King <[email protected]>
Reviewed-by Florian Fainelli <[email protected]>
Signature · 1 line
Florian
From: Russell King <[email protected]>
Date: Thu, 27 Feb 2020 09:44:49 +0000
Quoted 5 lines
Don't attempt to interpret the PHY specific status register unless the PHY is indicating that the resolution is valid.
Reviewed-by Andrew Lunn <[email protected]>Signed-off-by Russell King <[email protected]>
Applied.