[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bedf2521-dcbf-4b5b-8482-9436a54a614f@redhat.com>
Date: Thu, 28 Nov 2024 09:44:37 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>,
Andrew Lunn <andrew@...n.ch>, Heiner Kallweit <hkallweit1@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Oleksij Rempel <o.rempel@...gutronix.de>,
Florian Fainelli <florian.fainelli@...adcom.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net v3] net: phy: fix phy_ethtool_set_eee() incorrectly
enabling LPI
Hi,
On 11/23/24 15:50, Russell King (Oracle) wrote:
> When phy_ethtool_set_eee_noneg() detects a change in the LPI
> parameters, it attempts to update phylib state and trigger the link
> to cycle so the MAC sees the updated parameters.
>
> However, in doing so, it sets phydev->enable_tx_lpi depending on
> whether the EEE configuration allows the MAC to generate LPI without
> taking into account the result of negotiation.
>
> This can be demonstrated with a 1000base-T FD interface by:
>
> # ethtool --set-eee eno0 advertise 8 # cause EEE to be not negotiated
> # ethtool --set-eee eno0 tx-lpi off
> # ethtool --set-eee eno0 tx-lpi on
>
> This results in being true, despite EEE not having been negotiated and:
> # ethtool --show-eee eno0
> EEE status: enabled - inactive
> Tx LPI: 250 (us)
> Supported EEE link modes: 100baseT/Full
> 1000baseT/Full
> Advertised EEE link modes: 100baseT/Full
> 1000baseT/Full
>
> Fix this by keeping track of whether EEE was negotiated via a new
> eee_active member in struct phy_device, and include this state in
> the decision whether phydev->enable_tx_lpi should be set.
>
> Fixes: 3e43b903da04 ("net: phy: Immediately call adjust_link if only tx_lpi_enabled changes")
> Signed-off-by: Russell King (Oracle) <rmk+kernel@...linux.org.uk>
This patch did not apply net cleanly to net tree when it was submitted,
due to its dependency. As a result it did not went through the CI tests.
Currently there is little material there phy specific - mostly builds
with different Kconfigs - but with time we hope to increase H/W coverage.
AFAICS this patch has no kconfig implication, so my local build should
be a safe-enough test, but please wait for the pre-reqs being merged for
future submissions.
Thanks,
Paolo
Powered by blists - more mailing lists