提交 6a027b70 编写于 作者: S Soren Brinkmann 提交者: David S. Miller

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: NSoren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ccd6d0a9
...@@ -951,6 +951,10 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) ...@@ -951,6 +951,10 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
if (unlikely(status & (MACB_TX_ERR_FLAGS))) { if (unlikely(status & (MACB_TX_ERR_FLAGS))) {
macb_writel(bp, IDR, MACB_TX_INT_FLAGS); macb_writel(bp, IDR, MACB_TX_INT_FLAGS);
schedule_work(&bp->tx_error_task); schedule_work(&bp->tx_error_task);
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
macb_writel(bp, ISR, MACB_TX_ERR_FLAGS);
break; break;
} }
...@@ -968,6 +972,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) ...@@ -968,6 +972,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
bp->hw_stats.gem.rx_overruns++; bp->hw_stats.gem.rx_overruns++;
else else
bp->hw_stats.macb.rx_overruns++; bp->hw_stats.macb.rx_overruns++;
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
macb_writel(bp, ISR, MACB_BIT(ISR_ROVR));
} }
if (status & MACB_BIT(HRESP)) { if (status & MACB_BIT(HRESP)) {
...@@ -977,6 +984,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id) ...@@ -977,6 +984,9 @@ static irqreturn_t macb_interrupt(int irq, void *dev_id)
* (work queue?) * (work queue?)
*/ */
netdev_err(dev, "DMA bus error: HRESP not OK\n"); netdev_err(dev, "DMA bus error: HRESP not OK\n");
if (bp->caps & MACB_CAPS_ISR_CLEAR_ON_WRITE)
macb_writel(bp, ISR, MACB_BIT(HRESP));
} }
status = macb_readl(bp, ISR); status = macb_readl(bp, ISR);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部