Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Hongmei Xu
Thu, 22 Oct 2026 09:33
[PATCH net-next v4 0/2] net: phy: aquantia: fix PMA capability reporting and EEE discovery
Author: Hongmei Xu
Date: Thu, 22 Oct 2026 09:33
Date: Thu, 22 Oct 2026 09:33
55 lines
18054 bytes
18054 bytes
This series fixes two related issues in the Aquantia PHY driver:
- Patch 1 restores EEE discovery for AQR111, AQR111B0, AQR114C,
AQR115, AQR115C and AQCS109 by calling genphy_c45_read_eee_abilities()
after the final supported mask is built. The phy_gbit_features base is
preserved because these PHYs misreport PMA capabilities.
- Patch 2 adds get_features() for AQR113C to correctly declare 10G/5G/
2.5G/1G support, since the PHY misreports these speeds in PMA extended
abilities registers.
---
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 <andrew@lunn.ch>
To: Heiner Kallweit <hkallweit1@gmail.com>
To: Russell King <linux@armlinux.org.uk>
To: "David S. Miller" <davem@davemloft.net>
To: Eric Dumazet <edumazet@google.com>
To: Jakub Kicinski <kuba@kernel.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Hongmei Xu (2):
net: phy: aquantia: restore EEE discovery in get_features callbacks
net: phy: aquantia: add get_features() for AQR113C
drivers/net/phy/aquantia/aquantia_main.c | 30 +++++++++++++++++++++++++-----
1 file changed, 25 insertions(+), 5 deletions(-)
---
base-commit: 944ae66642b726bd6b25ae71b1e9ff88a0e0bdb0
change-id: 20260917-net-phy-aqr113c-fix-pma-capability-d7d08cbc9879
Best regards,
--
Hongmei Xu <hongmei.xu@oss.qualcomm.com>
[PATCH net-next v4 1/2] net: phy: aquantia: restore EEE discovery in get_features callbacks
Author: Hongmei Xu
Date: Thu, 22 Oct 2026 09:33
Date: Thu, 22 Oct 2026 09:33
64 lines
17595 bytes
17595 bytes
aqr115c_get_features() populates phydev->supported by ORing in
phy_gbit_features and setting the 2.5G bit directly. This skips
genphy_c45_read_eee_abilities(), which fills phydev->supported_eee.
As a result, phy_probe() never populates supported_eee for AQR111,
AQR111B0, AQR114C, AQR115, AQCS109 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.
genphy_c45_pma_read_abilities() is not used to build the supported mask
because these PHYs misreport PMA capabilities. The supported and
advertised link modes are intentionally unchanged; only EEE discovery
is restored.
Fix this by calling genphy_c45_read_eee_abilities() at the end of
aqr115c_get_features(), after the final supported mask is built so that
2500baseT_Full is already set when the EEE cap2 register is read.
Also fix aqr111_get_features() to propagate the return value of
aqr115c_get_features().
Fixes: 17cbfcdd85f6 ("net: phy: aquantia: AQR115c fix up PMA capabilities")
Fixes: 8f61d73306c6 ("net: phy: aquantia: remove usage of phy_set_max_speed")
Signed-off-by: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
---
drivers/net/phy/aquantia/aquantia_main.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/net/phy/aquantia/aquantia_main.c b/drivers/net/phy/aquantia/aquantia_main.c
index e95d391a6dc2..099ee919de94 100644
--- a/drivers/net/phy/aquantia/aquantia_main.c
+++ b/drivers/net/phy/aquantia/aquantia_main.c
@@ -1079,15 +1079,17 @@ static int aqr115c_get_features(struct phy_device *phydev)
linkmode_or(supported, supported, phy_gbit_features);
linkmode_set_bit(ETHTOOL_LINK_MODE_2500baseT_Full_BIT, supported);
- return 0;
+ return genphy_c45_read_eee_abilities(phydev);
}
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
[PATCH net-next v4 2/2] net: phy: aquantia: add get_features() for AQR113C
Author: Hongmei Xu
Date: Thu, 22 Oct 2026 09:33
Date: Thu, 22 Oct 2026 09:33
60 lines
17329 bytes
17329 bytes
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 reads PMA abilities and forces 1G/5G/2.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.
Fixes: 12cf1b89a668 ("net: phy: Add support for AQR113C EPHY")
Signed-off-by: Hongmei Xu <hongmei.xu@oss.qualcomm.com>
---
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 099ee919de94..153adfbda53f 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)
+{
+ /* 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);
+
+ 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads