diff mbox series

[RFC] net: stmmac: Set FIFO sizes for ipq806x

Message ID 20200622182940.GA6991@earth.li (mailing list archive)
State New, archived
Headers show
Series [RFC] net: stmmac: Set FIFO sizes for ipq806x | expand

Commit Message

Jonathan McDowell June 22, 2020, 6:29 p.m. UTC
(This is an RFC in the hope someone with better knowledge of the
Qualcomm IPQ806x hardware can confirm 8k is the correct FIFO depth. I've
plucked that value from the MikroTik kernel patch, and it works for me,
and 0 definitely isn't the right value.)

Commit eaf4fac47807 ("net: stmmac: Do not accept invalid MTU values")
started using the TX FIFO size to verify what counts as a valid MTU
request for the stmmac driver.  This is unset for the ipq806x variant.
Looking at older patches for this it seems the RX + TX buffers can be
up to 8k, so set appropriately.

Signed-off-by: Jonathan McDowell <noodles@earth.li>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
index 02102c781a8c..546b37ebd3b0 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-ipq806x.c
@@ -351,6 +351,8 @@  static int ipq806x_gmac_probe(struct platform_device *pdev)
 	plat_dat->has_gmac = true;
 	plat_dat->bsp_priv = gmac;
 	plat_dat->fix_mac_speed = ipq806x_gmac_fix_mac_speed;
+	plat_dat->tx_fifo_size = 8192;
+	plat_dat->rx_fifo_size = 8192;
 
 	err = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
 	if (err)