[PATCH net v2 2/3] net: stmmac: advertise integrated PCS interfaces to phylink

Thomas Karpiniec tom.karpiniec at outlook.com
Thu Sep 17 21:50:55 PDT 2026


From: Thomas Karpiniec <tom at wendy.sh>

stmmac_phylink_setup() adds interfaces reported by platform
get_interfaces() and non-integrated PCS instances to
config->supported_interfaces, but omits the integrated PCS.

On qcom-ethqos with 2500BASE-X selected by firmware, this leaves SGMII
out of the supported interface bitmap, causing phylink to remove the
lower-speed modes of a switching PHY such as QCA8081.

Add the integrated PCS interface bitmap to config->supported_interfaces.

Fixes: 68cff4fff61f ("net: stmmac: add BASE-X support to integrated PCS")
Cc: stable at vger.kernel.org # 7.0+
Assisted-by: LLM sparse
Signed-off-by: Thomas Karpiniec <tom at wendy.sh>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 1350e92943ac..f956e0d2ec64 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1414,6 +1414,12 @@ static int stmmac_phylink_setup(struct stmmac_priv *priv)
 		__set_bit(priv->plat->phy_interface,
 			  config->supported_interfaces);
 
+	/* If we have an integrated PCS, add the interfaces it supports. */
+	if (priv->integrated_pcs)
+		phy_interface_or(config->supported_interfaces,
+				 config->supported_interfaces,
+				 priv->integrated_pcs->pcs.supported_interfaces);
+
 	/* If we have an xpcs, it defines which PHY interfaces are supported. */
 	if (priv->hw->xpcs)
 		pcs = xpcs_to_phylink_pcs(priv->hw->xpcs);
-- 
2.54.0 (Apple Git-157)




More information about the linux-arm-kernel mailing list