From: Jose Abreu Date: Fri, 28 Jun 2019 07:29:19 +0000 (+0200) Subject: net: stmmac: Update RX Tail Pointer to last free entry X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=858a31ffc3d97a133e0f4fb2b5726b5ef80cb549;p=openwrt%2Fstaging%2Fblogic.git net: stmmac: Update RX Tail Pointer to last free entry Update the RX Tail Pointer to the last available SKB entry. Signed-off-by: Jose Abreu Cc: Joao Pinto Cc: David S. Miller Cc: Giuseppe Cavallaro Cc: Alexandre Torgue Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 620dd387e3b1..a629b3144a0d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3347,6 +3347,8 @@ 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; + rx_q->rx_tail_addr = rx_q->dma_rx_phy + + (rx_q->dirty_rx * sizeof(struct dma_desc)); stmmac_set_rx_tail_ptr(priv, priv->ioaddr, rx_q->rx_tail_addr, queue); }