static irqreturn_t et131x_isr(int irq, void *dev_id)
{
bool handled = true;
+ bool enable_interrupts = true;
struct net_device *netdev = (struct net_device *)dev_id;
struct et131x_adapter *adapter = netdev_priv(netdev);
struct address_map __iomem *iomem = adapter->regs;
if (!netif_device_present(netdev)) {
handled = false;
+ enable_interrupts = false;
goto out;
}
status &= ~ET_INTR_WATCHDOG;
}
- if (status & (ET_INTR_RXDMA_XFR_DONE | ET_INTR_TXDMA_ISR))
+ if (status & (ET_INTR_RXDMA_XFR_DONE | ET_INTR_TXDMA_ISR)) {
+ enable_interrupts = false;
napi_schedule(&adapter->napi);
+ }
status &= ~(ET_INTR_TXDMA_ISR | ET_INTR_RXDMA_XFR_DONE);
*/
}
- if (!status) {
- /* This interrupt has in some way been "handled" by
- * the ISR. Either it was a spurious Rx interrupt, or
- * it was a Tx interrupt that has been filtered by
- * the ISR.
- */
+out:
+ if (enable_interrupts)
et131x_enable_interrupts(adapter);
- }
-out:
return IRQ_RETVAL(handled);
}
}
/* et131x_tx - The handler to tx a packet on the device */
-static int et131x_tx(struct sk_buff *skb, struct net_device *netdev)
+static netdev_tx_t et131x_tx(struct sk_buff *skb, struct net_device *netdev)
{
int status = 0;
struct et131x_adapter *adapter = netdev_priv(netdev);