Skip to content

Commit

Permalink
net: ll_temac: Improve error message on error IRQ
Browse files Browse the repository at this point in the history
The channel status register value can be very helpful when debugging
SDMA problems.

Signed-off-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Esben Haabendal authored and David S. Miller committed May 7, 2019
1 parent d678714 commit 5db9c74
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/net/ethernet/xilinx/ll_temac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,8 +886,10 @@ static irqreturn_t ll_temac_tx_irq(int irq, void *_ndev)

if (status & (IRQ_COAL | IRQ_DLY))
temac_start_xmit_done(lp->ndev);
if (status & 0x080)
dev_err(&ndev->dev, "DMA error 0x%x\n", status);
if (status & (IRQ_ERR | IRQ_DMAERR))
dev_err_ratelimited(&ndev->dev,
"TX error 0x%x TX_CHNL_STS=0x%08x\n",
status, lp->dma_in(lp, TX_CHNL_STS));

return IRQ_HANDLED;
}
Expand All @@ -904,6 +906,10 @@ static irqreturn_t ll_temac_rx_irq(int irq, void *_ndev)

if (status & (IRQ_COAL | IRQ_DLY))
ll_temac_recv(lp->ndev);
if (status & (IRQ_ERR | IRQ_DMAERR))
dev_err_ratelimited(&ndev->dev,
"RX error 0x%x RX_CHNL_STS=0x%08x\n",
status, lp->dma_in(lp, RX_CHNL_STS));

return IRQ_HANDLED;
}
Expand Down

0 comments on commit 5db9c74

Please sign in to comment.