net: phy: respect cached advertising when re-enabling EEE
Subsystems (3)
Heiner Kallweit
maintainerPATCH 1/1 net: phy: respect cached advertising when re-enabling EEE
If we remove modes from EEE advertisement and disable / re-enable EEE, then advertisement is set to all supported modes. I don't think this is what the user expects. So respect the cached advertisement and just fall back to all supported modes if cached advertisement is empty.
--- drivers/net/phy/phy-c45.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/net/phy/phy-c45.c +3 -4
@@ -1568,11 +1568,10 @@ int genphy_c45_ethtool_set_eee(struct phy_device *phydev,phydev_warn (phydev,"At least some EEE link modes are not supported.\n" );return -EINVAL ; } - }else { - adv = phydev->supported_eee; +linkmode_copy (phydev->advertising_eee, adv); + }else if (linkmode_empty (phydev->advertising_eee)) { +phy_advertise_eee_all (phydev); } - -linkmode_copy (phydev->advertising_eee, adv); } phydev->eee_enabled = data->eee_enabled;
Signature · 1 line
2.47.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Fri, 1 Nov 2024 20:35:41 +0100 you wrote:
If we remove modes from EEE advertisement and disable / re-enable EEE, then advertisement is set to all supported modes. I don't think this is what the user expects. So respect the cached advertisement and just fall back to all supported modes if cached advertisement is empty.
Signed-off-by Heiner Kallweit <[email protected]>[...]
Here is the summary with links:
- [net-next] net: phy: respect cached advertising when re-enabling EEE
https://git.kernel.org/netdev/net-next/c/516a5f11eb97
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html