]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes
authorCorentin Labbe <clabbe@baylibre.com>
Fri, 19 Mar 2021 13:44:22 +0000 (13:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 19 Mar 2021 20:44:06 +0000 (13:44 -0700)
commitf49d69e1facde4cbb82bdb1d61d627cca088a77a
tree42bd93ea3404b6e2e042e85498cc96d48caa672a
parent596077e18027151aff72a5d4d8c0c16375ac08d8
net: stmmac: dwmac-sun8i: Provide TX and RX fifo sizes

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 fc7328eec899 ("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: 3a69638775f ("net-next: stmmac: Add dwmac-sun8i")
Reported-by: Belisko Marek <marek.belisko@gmail.com>
Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c