AQR113c does not correctly report its supported PMA capabilities which includes speeds like 10G/5G/2.5G. Add get_features() to explicitly declare 10G/5G/2.5G/1G support instead of relying on PMA register reads. The AQR113 likely has the same issue since it is a closely related variant, but this fix is limited to AQR113C as that is the only hardware available for testing. Signed-off-by: Hongmei Xu --- drivers/net/phy/aquantia/aquantia_main.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c index ed5631f2956e..8213d9a15b4f 100644 --- a/drivers/net/phy/aquantia/aquantia_main.c +++ b/drivers/net/phy/aquantia/aquantia_main.c @@ -1096,6 +1096,23 @@ static int aqr111_get_features(struct phy_device *phydev) return 0; } +static int aqr113c_get_features(struct phy_device *phydev) +{ + /* Generic C45 PMA abilities do not fully describe the PHY's copper + * autonegotiation modes, so add the 10G mode explicitly. + */ + int ret; + + ret = aqr111_get_features(phydev); + if (ret) + return ret; + + linkmode_set_bit(ETHTOOL_LINK_MODE_10000baseT_Full_BIT, + phydev->supported); + + return 0; +} + static int aqr_gen4_config_init(struct phy_device *phydev) { struct aqr107_priv *priv = phydev->priv; @@ -1446,6 +1463,7 @@ static struct phy_driver aqr_driver[] = { .get_sset_count = aqr107_get_sset_count, .get_strings = aqr107_get_strings, .get_stats = aqr107_get_stats, + .get_features = aqr113c_get_features, .link_change_notify = aqr107_link_change_notify, .led_brightness_set = aqr_phy_led_brightness_set, .led_hw_is_supported = aqr_phy_led_hw_is_supported, -- 2.34.1