Skip to content

Commit 1975df8

Browse files
wvoondavem330
authored andcommitted
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: 1103d3a ("net: stmmac: dwmac4: Also use TBU interrupt to clean TX path") Signed-off-by: Voon Weifeng <[email protected]> Signed-off-by: Vijayakannan Ayyathurai <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 022522a commit 1975df8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,12 @@ int dwmac4_dma_interrupt(void __iomem *ioaddr,
172172
x->rx_normal_irq_n++;
173173
ret |= handle_rx;
174174
}
175-
if (likely(intr_status & (DMA_CHAN_STATUS_TI |
176-
DMA_CHAN_STATUS_TBU))) {
175+
if (likely(intr_status & DMA_CHAN_STATUS_TI)) {
177176
x->tx_normal_irq_n++;
178177
ret |= handle_tx;
179178
}
179+
if (unlikely(intr_status & DMA_CHAN_STATUS_TBU))
180+
ret |= handle_tx;
180181
if (unlikely(intr_status & DMA_CHAN_STATUS_ERI))
181182
x->rx_early_irq++;
182183

0 commit comments

Comments
 (0)