]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: stmmac: Update RX Tail Pointer to last free entry
authorJose Abreu <Jose.Abreu@synopsys.com>
Fri, 28 Jun 2019 07:29:19 +0000 (09:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 28 Jun 2019 16:23:39 +0000 (09:23 -0700)
Update the RX Tail Pointer to the last available SKB entry.

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Cc: Joao Pinto <jpinto@synopsys.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 620dd387e3b15d75011b1a54eb1eff7fc329deff..a629b3144a0dcaaa5acd5e4046777995f5a9aed4 100644 (file)
@@ -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);
 }