lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <78900f88-e0a9-470b-8cf9-778612b30a91@lunn.ch>
Date: Wed, 17 Sep 2025 14:48:50 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	kernel@...gutronix.de, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, Russell King <linux@...linux.org.uk>
Subject: Re: [PATCH net-next v3 1/1] net: phy: clear link parameters on admin
 link down

On Wed, Sep 17, 2025 at 11:47:51AM +0200, Oleksij Rempel wrote:
> 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@...gutronix.de>

Reviewed-by: Andrew Lunn <andrew@...n.ch>

    Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ