Skip to content

Commit 6a027b7

Browse files
sorenb-xlnxdavem330
authored andcommitted
net: macb: Clear interrupt flags
A few interrupt flags were not cleared in the ISR, resulting in a sytem trapped in the ISR in cases one of those interrupts occurred. Clear all flags to avoid such situations. Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ccd6d0a commit 6a027b7

File tree

1 file changed

+10
-0
lines changed
  • drivers/net/ethernet/cadence

1 file changed

+10
-0
lines changed

drivers/net/ethernet/cadence/macb.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,10 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
951951
if (unlikely(status & (MACB_TX_ERR_FLAGS))) {
952952
macb_writel(bp, IDR, MACB_TX_INT_FLAGS);
953953
schedule_work(&bp->tx_error_task);
954+
955+
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
956+
macb_writel(bp, ISR, MACB_TX_ERR_FLAGS);
957+
954958
break;
955959
}
956960

@@ -968,6 +972,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
968972
bp->hw_stats.gem.rx_overruns++;
969973
else
970974
bp->hw_stats.macb.rx_overruns++;
975+
976+
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
977+
macb_writel(bp, ISR, MACB_BIT(ISR_ROVR));
971978
}
972979

973980
if (status & MACB_BIT(HRESP)) {
@@ -977,6 +984,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
977984
* (work queue?)
978985
*/
979986
netdev_err(dev, "DMA bus error: HRESP not OK\n");
987+
988+
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
989+
macb_writel(bp, ISR, MACB_BIT(HRESP));
980990
}
981991

982992
status = macb_readl(bp, ISR);

0 commit comments

Comments
 (0)