Commit 1975df88 authored by Voon Weifeng's avatar Voon Weifeng Committed by David S. Miller

net: stmmac: fix INTR TBU status affecting irq count statistic

DMA channel status "Transmit buffer unavailable(TBU)" bit is not
considered as a successful dma tx. Hence, it should not affect
all the irq count statistic.

Fixes: 1103d3a5 ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path")
Signed-off-by: default avatarVoon Weifeng <weifeng.voon@intel.com>
Signed-off-by: default avatarVijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 022522ac
...@@ -172,11 +172,12 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr, ...@@ -172,11 +172,12 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr,
x->rx_normal_irq_n++; x->rx_normal_irq_n++;
ret |= handle_rx; ret |= handle_rx;
} }
if (likely(intr_status & (DMA_CHAN_STATUS_TI | if (likely(intr_status & DMA_CHAN_STATUS_TI)) {
DMA_CHAN_STATUS_TBU))) {
x->tx_normal_irq_n++; x->tx_normal_irq_n++;
ret |= handle_tx; ret |= handle_tx;
} }
if (unlikely(intr_status & DMA_CHAN_STATUS_TBU))
ret |= handle_tx;
if (unlikely(intr_status & DMA_CHAN_STATUS_ERI)) if (unlikely(intr_status & DMA_CHAN_STATUS_ERI))
x->rx_early_irq++; x->rx_early_irq++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment