summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-05-06 10:13:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-05-09 11:47:33 +0200
commit4206c1e0051e0f500d65232203ea304ba25c7c5a (patch)
tree3b267d789a1f3d379f66e669455b3c0b5ec74f45
parent0aafb86e38c5e436fee409f2b94b145e22c4a8be (diff)
downloadbarebox-4206c1e0051e0f500d65232203ea304ba25c7c5a.tar.gz
net: fsl-fman: Sync rx buffers for device initially
The rx buffers must be given to the device initially to work properly. Otherwise the first packets are corrupted. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/net/fsl-fman.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/fsl-fman.c b/drivers/net/fsl-fman.c
index 1a11ca4..4e6bb2e 100644
--- a/drivers/net/fsl-fman.c
+++ b/drivers/net/fsl-fman.c
@@ -640,6 +640,8 @@ static int fm_eth_rx_port_parameter_init(struct fm_eth *fm_eth)
i * MAX_RXBUF_LEN));
buf_lo = lower_32_bits(virt_to_phys(rx_buf_pool +
i * MAX_RXBUF_LEN));
+ dma_sync_single_for_device((unsigned long)rx_buf_pool + i * MAX_RXBUF_LEN,
+ MAX_RXBUF_LEN, DMA_FROM_DEVICE);
muram_writew(&rxbd->buf_ptr_hi, (u16)buf_hi);
out_be32(&rxbd->buf_ptr_lo, buf_lo);
rxbd++;