net: axienet: Support shared interrupts
Specify IRQF_SHARED to support shared interrupts. If the interrupt handler is called and the device is not indicating an interrupt, just return IRQ_NONE rather than spewing error messages. Signed-off-by: Robert Hancock <hancock@sedsystems.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
867d03bc23
commit
9cbc1b6834
|
@ -809,7 +809,7 @@ static void axienet_recv(struct net_device *ndev)
|
||||||
* @irq: irq number
|
* @irq: irq number
|
||||||
* @_ndev: net_device pointer
|
* @_ndev: net_device pointer
|
||||||
*
|
*
|
||||||
* Return: IRQ_HANDLED for all cases.
|
* Return: IRQ_HANDLED if device generated a TX interrupt, IRQ_NONE otherwise.
|
||||||
*
|
*
|
||||||
* This is the Axi DMA Tx done Isr. It invokes "axienet_start_xmit_done"
|
* This is the Axi DMA Tx done Isr. It invokes "axienet_start_xmit_done"
|
||||||
* to complete the BD processing.
|
* to complete the BD processing.
|
||||||
|
@ -828,7 +828,7 @@ static irqreturn_t axienet_tx_irq(int irq, void *_ndev)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!(status & XAXIDMA_IRQ_ALL_MASK))
|
if (!(status & XAXIDMA_IRQ_ALL_MASK))
|
||||||
dev_err(&ndev->dev, "No interrupts asserted in Tx path\n");
|
return IRQ_NONE;
|
||||||
if (status & XAXIDMA_IRQ_ERROR_MASK) {
|
if (status & XAXIDMA_IRQ_ERROR_MASK) {
|
||||||
dev_err(&ndev->dev, "DMA Tx error 0x%x\n", status);
|
dev_err(&ndev->dev, "DMA Tx error 0x%x\n", status);
|
||||||
dev_err(&ndev->dev, "Current BD is at: 0x%x\n",
|
dev_err(&ndev->dev, "Current BD is at: 0x%x\n",
|
||||||
|
@ -858,7 +858,7 @@ out:
|
||||||
* @irq: irq number
|
* @irq: irq number
|
||||||
* @_ndev: net_device pointer
|
* @_ndev: net_device pointer
|
||||||
*
|
*
|
||||||
* Return: IRQ_HANDLED for all cases.
|
* Return: IRQ_HANDLED if device generated a RX interrupt, IRQ_NONE otherwise.
|
||||||
*
|
*
|
||||||
* This is the Axi DMA Rx Isr. It invokes "axienet_recv" to complete the BD
|
* This is the Axi DMA Rx Isr. It invokes "axienet_recv" to complete the BD
|
||||||
* processing.
|
* processing.
|
||||||
|
@ -877,7 +877,7 @@ static irqreturn_t axienet_rx_irq(int irq, void *_ndev)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (!(status & XAXIDMA_IRQ_ALL_MASK))
|
if (!(status & XAXIDMA_IRQ_ALL_MASK))
|
||||||
dev_err(&ndev->dev, "No interrupts asserted in Rx path\n");
|
return IRQ_NONE;
|
||||||
if (status & XAXIDMA_IRQ_ERROR_MASK) {
|
if (status & XAXIDMA_IRQ_ERROR_MASK) {
|
||||||
dev_err(&ndev->dev, "DMA Rx error 0x%x\n", status);
|
dev_err(&ndev->dev, "DMA Rx error 0x%x\n", status);
|
||||||
dev_err(&ndev->dev, "Current BD is at: 0x%x\n",
|
dev_err(&ndev->dev, "Current BD is at: 0x%x\n",
|
||||||
|
@ -953,11 +953,13 @@ static int axienet_open(struct net_device *ndev)
|
||||||
(unsigned long) lp);
|
(unsigned long) lp);
|
||||||
|
|
||||||
/* Enable interrupts for Axi DMA Tx */
|
/* Enable interrupts for Axi DMA Tx */
|
||||||
ret = request_irq(lp->tx_irq, axienet_tx_irq, 0, ndev->name, ndev);
|
ret = request_irq(lp->tx_irq, axienet_tx_irq, IRQF_SHARED,
|
||||||
|
ndev->name, ndev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_tx_irq;
|
goto err_tx_irq;
|
||||||
/* Enable interrupts for Axi DMA Rx */
|
/* Enable interrupts for Axi DMA Rx */
|
||||||
ret = request_irq(lp->rx_irq, axienet_rx_irq, 0, ndev->name, ndev);
|
ret = request_irq(lp->rx_irq, axienet_rx_irq, IRQF_SHARED,
|
||||||
|
ndev->name, ndev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto err_rx_irq;
|
goto err_rx_irq;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue