Skip to contentSkip to conversation

net: stmmac: dwmac-rk: Provide FIFO sizes for DWMAC 1000

PATCH RESEND Applied Chen-Yu Tsai 3 participants 3 messages Mar 12, 2025 – Mar 19, 2025

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 net: stmmac: dwmac-rk: Provide FIFO sizes for DWMAC 1000

From: Chen-Yu Tsai <[email protected]>

The DWMAC 1000 DMA capabilities register does not provide actual FIFO sizes, nor does the driver really care. If they are not provided via some other means, the driver will work fine, only disallowing changing the MTU setting.

Provide the FIFO sizes through the driver's platform data to enable MTU changes. The FIFO sizes are confirmed to be the same across RK3288, RK3328, RK3399 and PX30, based on their respective manuals. It is likely that Rockchip synthesized their DWMAC 1000 with the same parameters on all their chips that have it.

---
Resent with correct subject tag.

Changes since v1:
- Removed references to breakage from commit message as it is already fixed
- Removed Cc stable and Fixes tags
- Rebased onto latest -next

---
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +4 -1
index 003fa5cf42c3..e57181ce5f84 100644
@@ -1969,8 +1969,11 @@ static int rk_gmac_probe(struct platform_device *pdev)
 	/* If the stmmac is not already selected as gmac4,
 	 * then make sure we fallback to gmac.
 	 */
-	if (!plat_dat->has_gmac4)
+	if (!plat_dat->has_gmac4) {
 		plat_dat->has_gmac = true;
+		plat_dat->rx_fifo_size = 4096;
+		plat_dat->tx_fifo_size = 2048;
+	}
 
 	plat_dat->set_clk_tx_rate = rk_set_clk_tx_rate;
 
Signature · 1 line
2.39.5
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Chen-Yu Tsai

From: Chen-Yu Tsai <[email protected]>

The DWMAC 1000 DMA capabilities register does not provide actual FIFO sizes, nor does the driver really care. If they are not provided via some other means, the driver will work fine, only disallowing changing the MTU setting.

Quoted 8 lines

Provide the FIFO sizes through the driver's platform data to enable MTU changes. The FIFO sizes are confirmed to be the same across RK3288, RK3328, RK3399 and PX30, based on their respective manuals. It is likely that Rockchip synthesized their DWMAC 1000 with the same parameters on all their chips that have it.

---

#2 lore raw
In reply to Chen-Yu Tsai
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:

Quoted 8 lines · On Thu, 13 Mar 2025 00:34:26 +0800 you wrote:

From: Chen-Yu Tsai <[email protected]>

The DWMAC 1000 DMA capabilities register does not provide actual FIFO sizes, nor does the driver really care. If they are not provided via some other means, the driver will work fine, only disallowing changing the MTU setting.

[...]

Here is the summary with links:
- [RESEND,net-next,v2] net: stmmac: dwmac-rk: Provide FIFO sizes for DWMAC 1000

    https://git.kernel.org/netdev/net-next/c/d3c58b656c97

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html