From: Thomas Karpiniec <redacted>
The Qualcomm ETHQOS SerDes supports SGMII, 1000BASE-X and
2500BASE-X. However, the integrated PCS only includes 2500BASE-X in its
supported interface bitmap when the platform sets
STMMAC_FLAG_SERDES_SUPPORTS_2500M.
Set the flag when the optional SerDes is present. This allows stmmac to
select and configure the integrated PCS for 2500BASE-X and, once its
interface bitmap is propagated to phylink, preserves both the
lower-speed SGMII modes and 2500BASE-T.
Fixes: 61e9be0efbe8 ("net: stmmac: qcom-ethqos: add support for 2.5G BASEX mode")
Cc: stable@vger.kernel.org # 7.0+
Assisted-by: LLM sparse
Signed-off-by: Thomas Karpiniec <redacted>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index ac7d6d3e205a..0e07225a70ca 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -786,6 +786,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
plat_dat->host_dma_width = data->dma_addr_width;
if (ethqos->serdes_phy) {
+ plat_dat->flags |= STMMAC_FLAG_SERDES_SUPPORTS_2500M;
plat_dat->serdes_powerup = qcom_ethqos_serdes_powerup;
plat_dat->serdes_powerdown = qcom_ethqos_serdes_powerdown;
}--
2.54.0 (Apple Git-157)