aqr115c_get_features() populates phydev->supported by ORing in phy_gbit_features and setting the 2.5G bit directly. This skips genphy_c45_pma_read_abilities(), which is responsible for reading EEE capabilities and filling phydev->supported_eee. As a result, phy_probe() never populates supported_eee for AQR111, AQR114C and AQR115C. The kernel then clears advertising_eee: linkmode_and(phydev->advertising_eee, phydev->supported_eee, phydev->advertising_eee); This means EEE advertisement registers cannot be changed via ethtool and ethtool --show-eee reports no supported modes. Fix this by following the pattern used in aqr105_get_features(): call genphy_c45_pma_read_abilities() as the base, then set the 2.5G bit explicitly since the PHY does not report it correctly in PMA registers. Also fix aqr111_get_features() to check and propagate the return value of aqr115c_get_features(), which can now fail since it calls genphy_c45_pma_read_abilities(). Signed-off-by: Hongmei Xu --- drivers/net/phy/aquantia/aquantia_main.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index e95d391a6dc2..ed5631f2956e 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -1071,23 +1071,25 @@ static int aqr_gen1_resume(struct phy_device *phydev) static int aqr115c_get_features(struct phy_device *phydev) { - unsigned long *supported = phydev->supported; + int ret; - /* PHY supports speeds up to 2.5G with autoneg. PMA capabilities - * are not useful. - */ - linkmode_or(supported, supported, phy_gbit_features); - linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, supported); + ret = genphy_c45_pma_read_abilities(phydev); + if (ret) + return ret; + + linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, phydev->supported); return 0; } static int aqr111_get_features(struct phy_device *phydev) { - /* PHY supports speeds up to 5G with autoneg. PMA capabilities - * are not useful. - */ - aqr115c_get_features(phydev); + int ret; + + ret = aqr115c_get_features(phydev); + if (ret) + return ret; + linkmode_set_bit(ETHTOOL_LINK_MODE_5000baseT_Full_BIT, phydev->supported); -- 2.34.1