FAILED: Patch "net: stmmac: dwmac-loongson: Set clk_csr_i to 100-150MHz" failed to apply to 5.15-stable tree
Subsystems (5)
Sasha Levin
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From e1aa5ef892fb4fa9014a25e87b64b97347919d37 Mon Sep 17 00:00:00 2001
From: Huacai Chen <[email protected]>
Date: Tue, 3 Feb 2026 14:29:01 +0800
Subject: [PATCH] net: stmmac: dwmac-loongson: Set clk_csr_i to 100-150MHz
Current clk_csr_i setting of Loongson STMMAC (including LS7A1000/2000 and LS2K1000/2000/3000) are copy & paste from other drivers. In fact, Loongson STMMAC use 125MHz clocks and need 62 freq division to within 2.5MHz, meeting most PHY MDC requirement. So fix by setting clk_csr_i to 100-150MHz, otherwise some PHYs may link fail.
--- drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +2 -2
@@ -91,8 +91,8 @@ static void loongson_default_data(struct pci_dev *pdev,/* Get bus_id, this can be overwritten later */ plat->bus_id =pci_dev_id (pdev); -/* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */ - plat->clk_csr =STMMAC_CSR_20_35M ; +/* clk_csr_i = 100-150MHz & MDC = clk_csr_i/62 */ + plat->clk_csr =STMMAC_CSR_100_150M ; plat->core_type =DWMAC_CORE_GMAC ; plat->force_sf_dma_mode =1 ;
Signature · 1 line
2.51.0
Hi, Sasha,
Quoted 5 lines · Sasha Levin
The patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
I have already submit a patch for 5.15 some days ago:
https://lore.kernel.org/loongarch/[email protected]/T/#u
Huacai
Quoted 48 lines
Thanks,
Sasha------------------ original commit in Linus's tree ------------------
From
e1aa5ef892fb4fa9014a25e87b64b97347919d37Mon Sep 17 00:00:00 2001
From: Huacai Chen <[email protected]>
Date: Tue, 3 Feb 2026 14:29:01 +0800
Subject: [PATCH] net: stmmac: dwmac-loongson: Setclk_csr_ito 100-150MHzCurrent
clk_csr_isetting of Loongson STMMAC (including LS7A1000/2000 and LS2K1000/2000/3000) are copy & paste from other drivers. In fact, Loongson STMMAC use 125MHz clocks and need 62 freq division to within 2.5MHz, meeting most PHY MDC requirement. So fix by settingclk_csr_ito 100-150MHz, otherwise some PHYs may link fail.Fixes 30bba69d7db40e7 ("stmmac: pci: Add dwmac support for Loongson")Signed-off-by Hongliang Wang <[email protected]>Signed-off-by Huacai Chen <[email protected]>Signed-off-by Jakub Kicinski <[email protected]>--- drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c +2
-3@@ -91,8 +91,8 @@ static void loongson_default_data(struct pci_dev *pdev,/* Get bus_id, this can be overwritten later */ plat->bus_id =pci_dev_id (pdev); -/* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */ - plat->clk_csr =STMMAC_CSR_20_35M ; +/* clk_csr_i = 100-150MHz & MDC = clk_csr_i/62 */ + plat->clk_csr =STMMAC_CSR_100_150M ; plat->core_type =DWMAC_CORE_GMAC ; plat->force_sf_dma_mode =1 ; --2.51.0