Skip to content

Commit 806fd18

Browse files
ffainellidavem330
authored andcommitted
net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes
After commit bfcb813 ("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: eaf4fac ("net: stmmac: Do not accept invalid MTU values") Suggested-by: Chen-Yu Tsai <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Chen-Yu Tsai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e045124 commit 806fd18

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,8 @@ static int sun7i_gmac_probe(struct platform_device *pdev)
150150
plat_dat->init = sun7i_gmac_init;
151151
plat_dat->exit = sun7i_gmac_exit;
152152
plat_dat->fix_mac_speed = sun7i_fix_speed;
153+
plat_dat->tx_fifo_size = 4096;
154+
plat_dat->rx_fifo_size = 16384;
153155

154156
ret = sun7i_gmac_init(pdev, plat_dat->bsp_priv);
155157
if (ret)

0 commit comments

Comments
 (0)