All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] net: stmmac: Set FIFO sizes for ipq806x
@ 2020-06-22 18:29 Jonathan McDowell
  0 siblings, 0 replies; only message in thread
From: Jonathan McDowell @ 2020-06-22 18:29 UTC (permalink / raw)
  To: netdev, linux-arm-msm, Mathieu Olivari
  Cc: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu, David Miller,
	Jakub Kicinski, Maxime Coquelin, linux-stm32, linux-arm-kernel

(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 --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)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-22 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-22 18:29 [RFC PATCH] net: stmmac: Set FIFO sizes for ipq806x Jonathan McDowell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.