summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2026-02-23 12:34:56 +0300
committerJakub Kicinski <kuba@kernel.org>2026-02-25 04:43:23 +0300
commitfb42f19e671f831bab406d795664f98e1242d478 (patch)
tree8cf3f9bce283995c009905aca6066c748b9c6895
parentb8ab32315e22c0ef2c466d4f5ef4de0b5852e735 (diff)
downloadlinux-fb42f19e671f831bab406d795664f98e1242d478.tar.xz
net: stmmac: qcom-ethqos: move SerDes speed configuration
Move the SerDes speed configuration to phylink's .mac_finish() stage so that the SerDes is appropriately configured for the interface mode prior to the link coming up. Reviewed-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Tested-by: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Link: https://patch.msgid.link/E1vuSLA-0000000AScc-3RFf@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
index cd6d1660bdb2..153f6abc77cd 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
@@ -629,11 +629,6 @@ static void ethqos_configure_sgmii(struct qcom_ethqos *ethqos,
break;
}
- if (interface == PHY_INTERFACE_MODE_SGMII)
- ethqos_set_serdes_speed(ethqos, SPEED_1000);
- else
- ethqos_set_serdes_speed(ethqos, SPEED_2500);
-
ethqos_pcs_set_inband(priv, interface == PHY_INTERFACE_MODE_SGMII);
}
@@ -692,6 +687,11 @@ static int ethqos_mac_finish_serdes(struct net_device *ndev, void *priv,
qcom_ethqos_set_sgmii_loopback(ethqos, false);
+ if (interface == PHY_INTERFACE_MODE_SGMII)
+ ethqos_set_serdes_speed(ethqos, SPEED_1000);
+ else if (interface == PHY_INTERFACE_MODE_2500BASEX)
+ ethqos_set_serdes_speed(ethqos, SPEED_2500);
+
return 0;
}