Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: phy: clear EEE runtime state in PHY_HALTED/PHY_ERROR

Clear EEE runtime flags when the PHY transitions to HALTED or ERROR
and the state machine drops the link. This avoids stale EEE state being
reported via ethtool after the PHY is stopped or hits an error.

This change intentionally only clears software runtime flags and avoids
MDIO accesses in HALTED/ERROR. A follow-up patch will address other
link state variables.

Suggested-by: Russell King (Oracle) <linux@armlinux.org.uk>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/20250912132000.1598234-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Oleksij Rempel and committed by
Jakub Kicinski
0915cb22 b7df2e7e

+2
+2
drivers/net/phy/phy.c
··· 1551 1551 case PHY_ERROR: 1552 1552 if (phydev->link) { 1553 1553 phydev->link = 0; 1554 + phydev->eee_active = false; 1555 + phydev->enable_tx_lpi = false; 1554 1556 phy_link_down(phydev); 1555 1557 } 1556 1558 state_work = PHY_STATE_WORK_SUSPEND;