Re: [PATCH net-next v1 1/1] net: phy: clear EEE runtime state in PHY_HALTED/PHY_ERROR

From: Andrew Lunn

Date: Tue Sep 09 2025 - 10:00:32 EST


On Tue, Sep 09, 2025 at 03:12:48PM +0200, Oleksij Rempel wrote:
> 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.

One obvious question, why is EEE special? We have other state in
phydev which is not valid when the link is down. Are we setting speed
and duplex to UNKNOWN? lp_advertising, mdix, master_slave_state?

So while i agree it is nice not to show stale EEE state, maybe we
should not be showing any stale state and this patch needs extending?

Andrew