mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-21 07:37:36 +07:00
net: axienet: Service completion interrupts ASAP
The packet completion interrupts for TX and RX should be serviced before the packets are consumed. This ensures against the degenerate case when a new completion interrupt is raised after the handler has exited but before the interrupts are cleared. In this case its possible for the ISR to clear an unhandled interrupt (leading to potential deadlock). Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Tested-by: Jason Wu <huanyu@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
38e96b35cd
commit
80c775accd
@ -809,6 +809,7 @@ static irqreturn_t axienet_tx_irq(int irq, void *_ndev)
|
|||||||
|
|
||||||
status = axienet_dma_in32(lp, XAXIDMA_TX_SR_OFFSET);
|
status = axienet_dma_in32(lp, XAXIDMA_TX_SR_OFFSET);
|
||||||
if (status & (XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK)) {
|
if (status & (XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK)) {
|
||||||
|
axienet_dma_out32(lp, XAXIDMA_TX_SR_OFFSET, status);
|
||||||
axienet_start_xmit_done(lp->ndev);
|
axienet_start_xmit_done(lp->ndev);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -832,9 +833,9 @@ static irqreturn_t axienet_tx_irq(int irq, void *_ndev)
|
|||||||
axienet_dma_out32(lp, XAXIDMA_RX_CR_OFFSET, cr);
|
axienet_dma_out32(lp, XAXIDMA_RX_CR_OFFSET, cr);
|
||||||
|
|
||||||
tasklet_schedule(&lp->dma_err_tasklet);
|
tasklet_schedule(&lp->dma_err_tasklet);
|
||||||
|
axienet_dma_out32(lp, XAXIDMA_TX_SR_OFFSET, status);
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
axienet_dma_out32(lp, XAXIDMA_TX_SR_OFFSET, status);
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -857,6 +858,7 @@ static irqreturn_t axienet_rx_irq(int irq, void *_ndev)
|
|||||||
|
|
||||||
status = axienet_dma_in32(lp, XAXIDMA_RX_SR_OFFSET);
|
status = axienet_dma_in32(lp, XAXIDMA_RX_SR_OFFSET);
|
||||||
if (status & (XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK)) {
|
if (status & (XAXIDMA_IRQ_IOC_MASK | XAXIDMA_IRQ_DELAY_MASK)) {
|
||||||
|
axienet_dma_out32(lp, XAXIDMA_RX_SR_OFFSET, status);
|
||||||
axienet_recv(lp->ndev);
|
axienet_recv(lp->ndev);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
@ -880,9 +882,9 @@ static irqreturn_t axienet_rx_irq(int irq, void *_ndev)
|
|||||||
axienet_dma_out32(lp, XAXIDMA_RX_CR_OFFSET, cr);
|
axienet_dma_out32(lp, XAXIDMA_RX_CR_OFFSET, cr);
|
||||||
|
|
||||||
tasklet_schedule(&lp->dma_err_tasklet);
|
tasklet_schedule(&lp->dma_err_tasklet);
|
||||||
|
axienet_dma_out32(lp, XAXIDMA_RX_SR_OFFSET, status);
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
axienet_dma_out32(lp, XAXIDMA_RX_SR_OFFSET, status);
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user