]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 14 Apr 2020 22:39:52 +0000 (15:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Apr 2020 20:47:53 +0000 (13:47 -0700)
commita6fbf4e0351829a7b9e5ff164839722cad036c87
treed6f06e94fc68cba6d78cb373a901cc5f144e185d
parent1bc983a7224e23e9a17161fc39c125547ceee89c
net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes

After commit b202c04f8d0dd17dde6763551632b5f1fb0d64b0 ("net: dsa:
configure the MTU for switch ports") my Lamobo R1 platform which uses
an allwinner,sun7i-a20-gmac compatible Ethernet MAC started to fail
by rejecting a MTU of 1536. The reason for that is that the DMA
capabilities are not readable on this version of the IP, and there
is also no 'tx-fifo-depth' property being provided in Device Tree. The
property is documented as optional, and is not provided.

Chen-Yu indicated that the FIFO sizes are 4KB for TX and 16KB for RX, so
provide these values through platform data as an immediate fix until
various Device Tree sources get updated accordingly.

Fixes: cd0801e3d55f ("net: stmmac: Do not accept invalid MTU values")
Suggested-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c