[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aApM3MC_FW6BSpW8@shell.armlinux.org.uk>
Date: Thu, 24 Apr 2025 15:38:20 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Andrew Lunn <andrew@...n.ch>
Cc: Oleksij Rempel <o.rempel@...gutronix.de>,
Woojung Huh <woojung.huh@...rochip.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Heiner Kallweit <hkallweit1@...il.com>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
UNGLinuxDriver@...rochip.com, Simon Horman <horms@...nel.org>,
Maxime Chevallier <maxime.chevallier@...tlin.com>
Subject: Re: [PATCH net-next v1 3/4] net: phy: Don't report advertised EEE
modes if EEE is disabled
On Thu, Apr 24, 2025 at 04:30:40PM +0200, Andrew Lunn wrote:
> On Thu, Apr 24, 2025 at 03:02:21PM +0200, Oleksij Rempel wrote:
> > Currently, `ethtool --show-eee` reports "Advertised EEE link modes" even when
> > EEE is disabled, which can be misleading. For example:
> >
> > EEE settings for lan1:
> > EEE status: disabled
> > Tx LPI: disabled
> > Supported EEE link modes: 100baseT/Full
> > 1000baseT/Full
> > Advertised EEE link modes: 100baseT/Full
> > 1000baseT/Full
> > Link partner advertised EEE link modes: Not reported
>
> What is the behaviour for normal link mode advertisement? If i turn
> autoneg off, do the advertised link modes disappear? Do they reappear
> when i turn autoneg back on again?
>
> I would expect EEE to follow what the normal link modes do. Assuming
> the Read/modify/write does not break this.
It's difficult to compare, because ethtool is implemented differently
between modifying the link modes and the EEE stuff. ethtool -s autoneg
on uses this:
if (autoneg_wanted == AUTONEG_ENABLE &&
advertising_wanted == NULL &&
full_advertising_wanted == NULL) {
unsigned int i;
/* Auto negotiation enabled, but with
* unspecified speed and duplex: enable all
* supported speeds and duplexes.
*/
whereas do_seee() has no special handling.
So, if we want ethtool --set-eee eee off; ethtool --set-eee eee on *not*
to end up with the advertising mask being cleared, then we have to
preserve it, or force the advertising mask to something if the
advertising mask is empty and eee_enabled is true.
Or we preserve the advertising mask when eee_enabled is cleared, which
is what we do today.
I think, given the different implementations in ethtool, we can't just
say "we want it to be have the same" by just modifying the kernel.
--
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