* [PATCH net-next] net: phy: fix phy_disable_eee
@ 2024-12-20 22:02 Heiner Kallweit
2025-01-03 1:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2024-12-20 22:02 UTC (permalink / raw)
To: Russell King - ARM Linux, Andrew Lunn, Paolo Abeni,
Jakub Kicinski, Eric Dumazet, David Miller
Cc: netdev@vger.kernel.org
genphy_c45_write_eee_adv() becomes a no-op if phydev->supported_eee
is cleared. That's not what we want because this function is still
needed to clear the EEE advertisement register(s).
Fill phydev->eee_broken_modes instead to ensure that userspace
can't re-enable EEE advertising.
Fixes: b55498ff14bd ("net: phy: add phy_disable_eee")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/phy_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 928dc3c50..6e169fced 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -3012,10 +3012,11 @@ EXPORT_SYMBOL(phy_support_eee);
*/
void phy_disable_eee(struct phy_device *phydev)
{
- linkmode_zero(phydev->supported_eee);
linkmode_zero(phydev->advertising_eee);
phydev->eee_cfg.tx_lpi_enabled = false;
phydev->eee_cfg.eee_enabled = false;
+ /* don't let userspace re-enable EEE advertisement */
+ linkmode_fill(phydev->eee_broken_modes);
}
EXPORT_SYMBOL_GPL(phy_disable_eee);
--
2.47.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: phy: fix phy_disable_eee
2024-12-20 22:02 [PATCH net-next] net: phy: fix phy_disable_eee Heiner Kallweit
@ 2025-01-03 1:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-01-03 1:20 UTC (permalink / raw)
To: Heiner Kallweit; +Cc: linux, andrew, pabeni, kuba, edumazet, davem, netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Fri, 20 Dec 2024 23:02:06 +0100 you wrote:
> genphy_c45_write_eee_adv() becomes a no-op if phydev->supported_eee
> is cleared. That's not what we want because this function is still
> needed to clear the EEE advertisement register(s).
> Fill phydev->eee_broken_modes instead to ensure that userspace
> can't re-enable EEE advertising.
>
> Fixes: b55498ff14bd ("net: phy: add phy_disable_eee")
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>
> [...]
Here is the summary with links:
- [net-next] net: phy: fix phy_disable_eee
https://git.kernel.org/netdev/net-next/c/c83ca5a4df7c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-03 1:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 22:02 [PATCH net-next] net: phy: fix phy_disable_eee Heiner Kallweit
2025-01-03 1:20 ` patchwork-bot+netdevbpf
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).