mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-28 09:22:08 +00:00
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. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Link: https://patch.msgid.link/c75f7f8b-5571-429f-abd3-ce682d178a4b@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
c1ddfdbee3
commit
516a5f11eb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user