netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	Heiner Kallweit <hkallweit1@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net v3] net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI
Date: Thu, 28 Nov 2024 09:44:37 +0100	[thread overview]
Message-ID: <bedf2521-dcbf-4b5b-8482-9436a54a614f@redhat.com> (raw)
In-Reply-To: <E1tErSe-005RhB-2R@rmk-PC.armlinux.org.uk>

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@armlinux.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


  reply	other threads:[~2024-11-28  8:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-23 14:50 [PATCH net v3] net: phy: fix phy_ethtool_set_eee() incorrectly enabling LPI Russell King (Oracle)
2024-11-28  8:44 ` Paolo Abeni [this message]
2024-11-28 11:13   ` Russell King (Oracle)
2024-11-28 12:08     ` Paolo Abeni
2024-11-28  8:50 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bedf2521-dcbf-4b5b-8482-9436a54a614f@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=florian.fainelli@broadcom.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=rmk+kernel@armlinux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).