diff options
| author | 2025-09-17 11:47:51 +0200 | |
|---|---|---|
| committer | 2025-09-18 15:43:26 -0700 | |
| commit | 60f887b1290b43a4f5a3497982a725687b193fa4 (patch) | |
| tree | 9a428dbaedad5638a64933c15045f5079332e7f0 /drivers/net/dsa/dsa_loop.c | |
| parent | net: ti: am65-cpsw: Update hw timestamping filter for PTPv1 RX packets (diff) | |
| download | wireguard-linux-60f887b1290b43a4f5a3497982a725687b193fa4.tar.xz wireguard-linux-60f887b1290b43a4f5a3497982a725687b193fa4.zip | |
net: phy: clear link parameters on admin link down
When a PHY is halted (e.g. `ip link set dev lan2 down`), several
fields in struct phy_device may still reflect the last active
connection. This leads to ethtool showing stale values even though
the link is down.
Reset selected fields in _phy_state_machine() when transitioning
to PHY_HALTED and the link was previously up:
- speed/duplex -> UNKNOWN, but only in autoneg mode (in forced mode
these fields carry configuration, not status)
- master_slave_state -> UNKNOWN if previously supported
- mdix -> INVALID (state only, same meaning as "unknown")
- lp_advertising -> always cleared
The cleanup is skipped if the PHY is in PHY_ERROR state, so the
last values remain available for diagnostics.
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250917094751.2101285-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
0 files changed, 0 insertions, 0 deletions
