diff options
author | Chen-Yu Tsai <wens@csie.org> | 2025-03-13 00:34:26 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-03-19 18:30:34 +0100 |
commit | d3c58b656c97de195df3889c55ee9e91a8d65b6c (patch) | |
tree | d97648663ff0f9a44076f48c0c4377144e1cd657 | |
parent | f749448ce9f13499b99384dbfab287fe55bc8f3c (diff) | |
download | linux-d3c58b656c97de195df3889c55ee9e91a8d65b6c.tar.gz linux-d3c58b656c97de195df3889c55ee9e91a8d65b6c.tar.bz2 linux-d3c58b656c97de195df3889c55ee9e91a8d65b6c.zip |
net: stmmac: dwmac-rk: Provide FIFO sizes for DWMAC 1000
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.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20250312163426.2178314-1-wens@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c index 2d4fee8b9ab1..c404017bc1da 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c @@ -1737,8 +1737,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; |