From: Zhangfei Gao <zhangfei.gao@oss.qualcomm.com>
To: shengchao.guo@oss.qualcomm.com,
bartosz.golaszewski@oss.qualcomm.com,
mohd.anwar@oss.qualcomm.com
Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, hkallweit1@gmail.com,
linux@armlinux.org.uk, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
Zhangfei Gao <zhangfei.gao@oss.qualcomm.com>
Subject: [PATCH 1/3] net: stmmac: support low-speed USXGMII validation
Date: Wed, 23 Sep 2026 16:49:19 +0800 [thread overview]
Message-ID: <20260923084921.3942100-2-zhangfei.gao@oss.qualcomm.com> (raw)
In-Reply-To: <20260923084921.3942100-1-zhangfei.gao@oss.qualcomm.com>
USXGMII transports the negotiated copper media rate over a fixed-rate
serial link. The PCS and MAC must retain the corresponding
10/100/1000/2500/5000/10000M full-duplex capabilities.
Advertise the media-rate link modes from the XPCS and allow the stmmac
MAC to validate 10M and 100M USXGMII links. This keeps phylink from
rejecting an AQR113C PHY whose advertisement contains base-T modes.
The XPCS also consumes the PHY-generated Clause 37 in-band link and
speed status, so USXGMII must use in-band signalling.
Signed-off-by: Zhangfei Gao <zhangfei.gao@oss.qualcomm.com>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
drivers/net/pcs/pcs-xpcs.c | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2dc0cb2916daf..5954048a9f7fc 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1045,6 +1045,8 @@ static unsigned long stmmac_mac_get_caps(struct phylink_config *config,
priv->hw->link.caps &= ~(MAC_1000HD | MAC_100HD | MAC_10HD);
config->mac_capabilities = priv->hw->link.caps;
+ if (interface == PHY_INTERFACE_MODE_USXGMII)
+ config->mac_capabilities |= MAC_10FD | MAC_100FD;
if (priv->plat->max_speed)
phylink_limit_mac_speed(config, priv->plat->max_speed);
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
index 091c9b57388fa..58ca296fc4420 100644
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -23,6 +23,12 @@ static const int xpcs_usxgmii_features[] = {
ETHTOOL_LINK_MODE_Pause_BIT,
ETHTOOL_LINK_MODE_Asym_Pause_BIT,
ETHTOOL_LINK_MODE_Autoneg_BIT,
+ ETHTOOL_LINK_MODE_10baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_100baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
ETHTOOL_LINK_MODE_1000baseKX_Full_BIT,
ETHTOOL_LINK_MODE_10000baseKX4_Full_BIT,
ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
@@ -737,7 +743,8 @@ static unsigned int xpcs_inband_caps(struct phylink_pcs *pcs,
case DW_10GBASER:
case DW_2500BASEX:
case DW_AN_C37_USXGMII:
- return LINK_INBAND_DISABLE;
+ /* The PCS consumes the PHY's CL37 in-band link and speed status. */
+ return LINK_INBAND_ENABLE;
default:
return 0;
--
2.43.0
next prev parent reply other threads:[~2026-09-23 8:49 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 1:07 [PATCH RFC net-next 0/9] net: introduce Qualcomm XPCS support and add Nord Ethernet plumbing Mohd Ayaan Anwar
2026-09-23 1:07 ` [PATCH RFC net-next 1/9] dt-bindings: net: pcs: add Qualcomm Nord XPCS Mohd Ayaan Anwar
2026-09-23 1:07 ` [PATCH RFC net-next 2/9] net: pcs: xpcs: add USXGMII Clause 37 autoneg support Mohd Ayaan Anwar
2026-09-23 13:31 ` Mohd Ayaan Anwar
2026-09-23 1:07 ` [PATCH RFC net-next 3/9] net: pcs: xpcs: add custom platform register accessors Mohd Ayaan Anwar
2026-09-23 12:18 ` Andrew Lunn
2026-09-23 12:37 ` Mohd Ayaan Anwar
2026-09-25 10:18 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 4/9] net: pcs: xpcs: add Qualcomm Nord platform support Mohd Ayaan Anwar
2026-09-23 12:07 ` Andrew Lunn
2026-09-23 12:57 ` Mohd Ayaan Anwar
2026-09-25 10:37 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 5/9] net: pcs: xpcs: initialize runtime PM as suspended Mohd Ayaan Anwar
2026-09-25 11:03 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 6/9] dt-bindings: net: qcom,ethqos: add Qualcomm Nord Mohd Ayaan Anwar
2026-09-23 1:07 ` [PATCH RFC net-next 7/9] net: stmmac: support custom XGMAC register layouts Mohd Ayaan Anwar
2026-09-25 12:22 ` Lorenzo Bianconi
2026-09-23 1:07 ` [PATCH RFC net-next 8/9] net: stmmac: qcom-ethqos: support external PCS Mohd Ayaan Anwar
2026-09-28 15:15 ` Maxime Chevallier
2026-09-23 1:07 ` [PATCH RFC net-next 9/9] net: stmmac: qcom-ethqos: add Qualcomm Nord support Mohd Ayaan Anwar
2026-09-25 13:02 ` Lorenzo Bianconi
2026-09-23 8:49 ` [PATCH 0/3] Nord ethernet followup Zhangfei Gao
2026-09-23 8:49 ` Zhangfei Gao [this message]
2026-09-23 12:58 ` [PATCH 1/3] net: stmmac: support low-speed USXGMII validation Andrew Lunn
2026-09-24 10:39 ` Zhangfei Gao
2026-09-24 14:22 ` Andrew Lunn
2026-09-23 13:09 ` Andrew Lunn
2026-09-24 11:12 ` Zhangfei Gao
2026-09-23 8:49 ` [PATCH 2/3] net: stmmac: qcom-ethqos: configure USXGMII rates Zhangfei Gao
2026-09-23 8:49 ` [PATCH 3/3] net: stmmac: fix 10/100 support and MDIO for DW25GMAC Zhangfei Gao
2026-09-23 12:50 ` [PATCH 0/3] Nord ethernet followup Andrew Lunn
2026-09-24 11:18 ` Zhangfei Gao
2026-09-23 8:50 ` [PATCH RFC net-next 0/9] net: introduce Qualcomm XPCS support and add Nord Ethernet plumbing Zhangfei Gao
2026-09-23 15:15 ` Andrew Lunn
2026-09-28 10:21 ` Krzysztof Kozlowski
2026-09-23 9:41 ` Maxime Chevallier
2026-09-23 10:43 ` Mohd Ayaan Anwar
2026-09-23 13:17 ` Coia Prant
2026-09-23 14:03 ` Mohd Ayaan Anwar
2026-09-24 5:54 ` Coia Prant
2026-09-23 18:35 ` Andrew Lunn
2026-09-24 5:25 ` Coia Prant
2026-09-23 18:40 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260923084921.3942100-2-zhangfei.gao@oss.qualcomm.com \
--to=zhangfei.gao@oss.qualcomm.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mohd.anwar@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shengchao.guo@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®