Re: [PATCH] net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes

2021-03-19 Thread patchwork-bot+netdevbpf
Hello:

This patch was applied to netdev/net.git (refs/heads/master):

On Fri, 19 Mar 2021 13:44:22 + you wrote:
> MTU cannot be changed on dwmac-sun8i. (ip link set eth0 mtu xxx returning 
> EINVAL)
> This is due to tx_fifo_size being 0, since this value is used to compute valid
> MTU range.
> Like dwmac-sunxi (with commit 806fd188ce2a ("net: stmmac: dwmac-sunxi: 
> Provide TX and RX fifo sizes"))
> dwmac-sun8i need to have tx and rx fifo sizes set.
> I have used values from datasheets.
> After this patch, setting a non-default MTU (like 1000) value works and 
> network is still useable.
> 
> [...]

Here is the summary with links:
  - net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes
https://git.kernel.org/netdev/net/c/014dfa26ce1c

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




[PATCH] net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes

2021-03-19 Thread Corentin Labbe
MTU cannot be changed on dwmac-sun8i. (ip link set eth0 mtu xxx returning 
EINVAL)
This is due to tx_fifo_size being 0, since this value is used to compute valid
MTU range.
Like dwmac-sunxi (with commit 806fd188ce2a ("net: stmmac: dwmac-sunxi: Provide 
TX and RX fifo sizes"))
dwmac-sun8i need to have tx and rx fifo sizes set.
I have used values from datasheets.
After this patch, setting a non-default MTU (like 1000) value works and network 
is still useable.

Tested-on: sun8i-h3-orangepi-pc
Tested-on: sun8i-r40-bananapi-m2-ultra
Tested-on: sun50i-a64-bananapi-m64
Tested-on: sun50i-h5-nanopi-neo-plus2
Tested-on: sun50i-h6-pine-h64
Fixes: 9f93ac8d408 ("net-next: stmmac: Add dwmac-sun8i")
Reported-by: Belisko Marek 
Signed-off-by: Corentin Labbe 
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c 
b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 6b75cf2603ff..e62efd166ec8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -1214,6 +1214,8 @@ static int sun8i_dwmac_probe(struct platform_device *pdev)
plat_dat->init = sun8i_dwmac_init;
plat_dat->exit = sun8i_dwmac_exit;
plat_dat->setup = sun8i_dwmac_setup;
+   plat_dat->tx_fifo_size = 4096;
+   plat_dat->rx_fifo_size = 16384;
 
ret = sun8i_dwmac_set_syscon(>dev, plat_dat);
if (ret)
-- 
2.26.2