aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBiao Huang <biao.huang@mediatek.com>2019-05-24 14:26:07 +0800
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-16 12:21:36 -0400
commit44c4b5c10e6ede1f0e9c31c6da123c3f690dd651 (patch)
treedb5ec3e6fc24be0f46d87cd8c15e7b8b856b2305
parent706fa5c0bf0f9966becf80aff134e1677e2456cf (diff)
downloadlinux-yocto-44c4b5c10e6ede1f0e9c31c6da123c3f690dd651.tar.gz
linux-yocto-44c4b5c10e6ede1f0e9c31c6da123c3f690dd651.tar.bz2
linux-yocto-44c4b5c10e6ede1f0e9c31c6da123c3f690dd651.zip
net: stmmac: update rx tail pointer register to fix rx dma hang issue.
commit 4523a5611526709ec9b4e2574f1bb7818212651e upstream. Currently we will not update the receive descriptor tail pointer in stmmac_rx_refill. Rx dma will think no available descriptors and stop once received packets exceed DMA_RX_SIZE, so that the rx only test will fail. Update the receive tail pointer in stmmac_rx_refill to add more descriptors to the rx channel, so packets can be received continually Fixes: 54139cf3bb33 ("net: stmmac: adding multiple buffers for rx") Signed-off-by: Biao Huang <biao.huang@mediatek.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index b756fc6a0532..5dd303212e28 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3298,6 +3298,7 @@ static inline void stmmac_rx_refill(struct stmmac_priv *priv, u32 queue)
entry = STMMAC_GET_ENTRY(entry, DMA_RX_SIZE);
}
rx_q->dirty_rx = entry;
+ stmmac_set_rx_tail_ptr(priv, priv->ioaddr, rx_q->rx_tail_addr, queue);
}
/**