net: phy: aquantia: add get_features() for AQR113C
Subsystems (3)
PATCH v6 1/1 net: phy: aquantia: add get_features() for AQR113C
AQR113C does not correctly report its supported speeds in the PMA extended abilities registers. Without a get_features callback, phy_probe() uses genphy_c45_pma_read_abilities() directly, which produces an incorrect supported mask.
Add aqr113c_get_features() that calls aqr111_get_features() as a base (which uses phy_gbit_features as base and forces 2.5G/5G that the PHY misreports) and sets 10000baseT_Full explicitly since the PHY also misreports 10G.
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.
---
Changes in v6:
- Repost after net-next reopened; no code changes from v5
- Link to v5: https://patch.msgid.link/20261029-net-phy-aqr113c-fix-pma-capability-v5-1-e57e9b9118cd@oss.qualcomm.com
Changes in v5:
- Drop patch 1; EEE discovery for AQR115C/AQR111/AQR114C is a separate
concern which is not related to this series
- Fix the comments from Sashiko: call genphy_c45_read_eee_abilities()
in aqr113c_get_features() after the full supported mask is built;
do not return EEE read result from get_features(), EEE read failure
should not fail phy_probe()
- Link to v4: https://patch.msgid.link/20261022-net-phy-aqr113c-fix-pma-capability-v4-0-95a17f75dd7a@oss.qualcomm.com
Changes in v4:
- Fix the comments from netdev-bot+sashiko
- Patch 1: keep phy_gbit_features base instead of genphy_c45_pma_read_abilities();
call genphy_c45_read_eee_abilities() explicitly after supported mask is built
- Patch 1: update commit message to accurately describe the fix; add missing
affected PHYs (AQR111B0, AQR115, AQCS109); add Fixes: tags
- Patch 2: fix commit message PMA reads still used as base and add Fixes: tag
- Link to v3: https://patch.msgid.link/20261016-net-phy-aqr113c-fix-pma-capability-v3-0-0bbb1b84035d@oss.qualcomm.com
Changes in v3:
- Add patch 1 to fix EEE discovery regression in aqr115c_get_features()
affecting AQR111, AQR114C and AQR115C
- Extend commit message to note AQR113 may have the same PMA issue
- Link to v2: https://patch.msgid.link/20260924-net-phy-aqr113c-fix-pma-capability-v2-1-29b06283b0f3@oss.qualcomm.com
Changes in v2:
- Fix subject prefix to [PATCH net-next]
- Limit scope to AQR113C only as AQR113 not tested
- Link to v1: https://patch.msgid.link/20260923-net-phy-aqr113c-fix-pma-capability-v1-1-497359310f06@oss.qualcomm.com
To: Andrew Lunn <[email protected]>
To: Heiner Kallweit <[email protected]>
To: Russell King <[email protected]>
To: "David S. Miller" <[email protected]>
To: Eric Dumazet <[email protected]>
To: Jakub Kicinski <[email protected]>
To: Paolo Abeni <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/net/phy/aquantia/aquantia_main.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/net/phy/aquantia/aquantia_main.c +19 -0
@@ -1094,6 +1094,24 @@ static int aqr111_get_features(struct phy_device *phydev)return 0 ; } +static int aqr113c_get_features (struct phy_device *phydev) +{ +/* AQR113C does not correctly report 10G in PMA extended abilities. +* Build on aqr111_get_features() for 5G/2.5G and add 10G explicitly. +*/ +int ret; + + ret =aqr111_get_features (phydev); +if (ret) +return ret; + +linkmode_set_bit (ETHTOOL_LINK_MODE_10000baseT_Full_BIT, + phydev->supported); + +genphy_c45_read_eee_abilities (phydev); +return 0 ; +} +static int aqr_gen4_config_init (struct phy_device *phydev) {struct aqr107_priv *priv = phydev->priv;
@@ -1444,6 +1462,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,
---
base-commit: 944ae66642b726bd6b25ae71b1e9ff88a0e0bdb0
change-id: 20260917-net-phy-aqr113c-fix-pma-capability-d7d08cbc9879
Best regards,
Signature · 1 line
Hongmei Xu <[email protected]>
Quoted 10 lines · Hongmei Xu
AQR113C does not correctly report its supported speeds in the PMA extended abilities registers. Without a
get_featurescallback,phy_probe()usesgenphy_c45_pma_read_abilities()directly, which produces an incorrect supported mask.Add
aqr113c_get_features()that callsaqr111_get_features()as a base (which usesphy_gbit_featuresas base and forces 2.5G/5G that the PHY misreports) and sets 10000baseT_Full explicitly since the PHY also misreports 10G.
Quoted 7 lines
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.
Fixes 12cf1b89a668 ("net: phy: Add support for AQR113C EPHY")Signed-off-by Hongmei Xu <[email protected]>
Andrew
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 11 lines · On Wed, 04 Nov 2026 17:59:13 +0800 you wrote:
AQR113C does not correctly report its supported speeds in the PMA extended abilities registers. Without a
get_featurescallback,phy_probe()usesgenphy_c45_pma_read_abilities()directly, which produces an incorrect supported mask.Add
aqr113c_get_features()that callsaqr111_get_features()as a base (which usesphy_gbit_featuresas base and forces 2.5G/5G that the PHY misreports) and sets 10000baseT_Full explicitly since the PHY also misreports 10G.[...]
Here is the summary with links:
- [net-next,v6] net: phy: aquantia: add get_features() for AQR113C
https://git.kernel.org/netdev/net-next/c/184ee52965c3
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html