Skip to content

Commit 5cb409b

Browse files
dangowrtPaolo Abeni
authored andcommitted
net: phy: realtek: clear 1000Base-T link partner advertisement
Clear 1000Base-T link partner advertisement bits in Clause-45 read_status() function in case auto-negotiation is disabled or has not been completed. Signed-off-by: Daniel Golle <[email protected]> Link: https://patch.msgid.link/9dc9b47b2d675708afef3ad366bfd78eb584d958.1728565530.git.daniel@makrotopia.org Signed-off-by: Paolo Abeni <[email protected]>
1 parent 68d5cd0 commit 5cb409b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/net/phy/realtek.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,10 @@ static int rtl822x_c45_read_status(struct phy_device *phydev)
10261026
if (ret < 0)
10271027
return ret;
10281028

1029+
if (phydev->autoneg == AUTONEG_DISABLE ||
1030+
!genphy_c45_aneg_done(phydev))
1031+
mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, 0);
1032+
10291033
/* Vendor register as C45 has no standardized support for 1000BaseT */
10301034
if (phydev->autoneg == AUTONEG_ENABLE) {
10311035
val = phy_read_mmd(phydev, MDIO_MMD_VEND2,

0 commit comments

Comments
 (0)