[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKg2HHIBAR8t2CQW@shell.armlinux.org.uk>
Date: Fri, 22 Aug 2025 10:19:24 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Oleksij Rempel <o.rempel@...gutronix.de>
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 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.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Powered by blists - more mailing lists