tasklet_init(&lp->dma_err_tasklet, axienet_dma_err_handler,
(unsigned long) lp);
+ /* Enable NAPI scheduling before enabling Axi DMA Rx IRQ, or you
+ * might run into a race condition; the RX ISR disables IRQ processing
+ * before scheduling the NAPI function to complete the processing.
+ * If NAPI scheduling is (still) disabled at that time, no more RX IRQs
+ * will be processed as only the NAPI function re-enables them!
+ */
+ napi_enable(&lp->napi);
+
/* Enable interrupts for Axi DMA Tx */
ret = request_irq(lp->tx_irq, axienet_tx_irq, 0, ndev->name, ndev);
if (ret)
goto err_eth_irq;
}
- napi_enable(&lp->napi);
-
return 0;
err_eth_irq:
err_rx_irq:
free_irq(lp->tx_irq, ndev);
err_tx_irq:
+ napi_disable(&lp->napi);
if (lp->phy_dev)
phy_disconnect(lp->phy_dev);
lp->phy_dev = NULL;