[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKg4XcM0vAIS4C-8@pengutronix.de>
Date: Fri, 22 Aug 2025 11:29:01 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, 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
Subject: Re: [PATCH net-next v2 1/1] net: phy: Clear link-specific data on
link down
On Fri, Aug 22, 2025 at 10:19:24AM +0100, Russell King (Oracle) wrote:
> On Fri, Aug 22, 2025 at 11:09:47AM +0200, Oleksij Rempel wrote:
> > When a network interface is brought down, the associated PHY is stopped.
> > However, several link-specific parameters within the phy_device struct
> > are not cleared. This leads to userspace tools like ethtool reporting
> > stale information from the last active connection, which is misleading
> > as the link is no longer active.
>
> This is not a good idea. Consider the case where the PHY has been
> configured with autoneg disabled, and phydev->speed etc specifies
> the desired speed.
>
> When the link goes down, all that state gets cleared, and we lose
> the user's settings.
>
> So no, I don't think this is appropriate.
>
> I think it is appropriate to clear some of the state, but anything that
> the user can configure (such as ->speed and ->duplex) must not be
> cleared.
Hm... should it be cleared conditionally? If autoneg is used, clear the
speed and duplex?
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists