Re: [PATCH net-next v1 3/4] net: phy: Don't report advertised EEE modes if EEE is disabled
From: Russell King (Oracle)
Date: Thu Apr 24 2025 - 09:14:36 EST
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
>
> This may lead to confusion for users who aren't familiar with kernel internals
> but understand that EEE functionality depends on proper advertisement during
> link negotiation. Seeing advertised EEE modes in this case might incorrectly
> suggest that EEE is still being advertised.
>
> After this change, if EEE is disabled, the output becomes:
>
> EEE settings for lan1:
> EEE status: disabled
> Tx LPI: disabled
> Supported EEE link modes: 100baseT/Full
> 1000baseT/Full
> Advertised EEE link modes: Not reported
> Link partner advertised EEE link modes: Not reported
>
> This better reflects the actual EEE configuration. The fix ensures
> advertised EEE modes are only reported when eee_cfg.eee_enabled is true.
No, this is a backwards step.
Tools like ethtool read-modify-write the settings. First they get, then
modify, then set.
This will have the effect that:
ethtool --set-eee eee off
ethtool --set-eee eee on
will clear the advertised link modes, which is not what one would
expect.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!