Skip to content

Commit

Permalink
net: phy: c45: Don't silently remove disabled EEE modes any longer wh…
Browse files Browse the repository at this point in the history
…en writing advertisement register

advertising_eee is adjusted now whenever an EEE mode gets disabled.
Therefore we can remove the silent removal of disabled EEE modes here.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/e95b9dad-24a7-4e3e-9af9-6f0770cf1520@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Heiner Kallweit authored and Jakub Kicinski committed Feb 19, 2025
1 parent 7f33fea commit aa951fe
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/net/phy/phy-c45.c
Original file line number Diff line number Diff line change
Expand Up @@ -683,13 +683,10 @@ EXPORT_SYMBOL_GPL(genphy_c45_read_mdix);
static int genphy_c45_write_eee_adv(struct phy_device *phydev,
unsigned long *adv)
{
__ETHTOOL_DECLARE_LINK_MODE_MASK(tmp);
int val, changed = 0;

linkmode_andnot(tmp, adv, phydev->eee_disabled_modes);

if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP1_FEATURES)) {
val = linkmode_to_mii_eee_cap1_t(tmp);
val = linkmode_to_mii_eee_cap1_t(adv);

/* IEEE 802.3-2018 45.2.7.13 EEE advertisement 1
* (Register 7.60)
Expand All @@ -707,7 +704,7 @@ static int genphy_c45_write_eee_adv(struct phy_device *phydev,
}

if (linkmode_intersects(phydev->supported_eee, PHY_EEE_CAP2_FEATURES)) {
val = linkmode_to_mii_eee_cap2_t(tmp);
val = linkmode_to_mii_eee_cap2_t(adv);

/* IEEE 802.3-2022 45.2.7.16 EEE advertisement 2
* (Register 7.62)
Expand Down

0 comments on commit aa951fe

Please sign in to comment.