* DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few
* superfluous timer interrupts from the nic.
*/
-#define FORCEDETH_VERSION "0.63"
+#define FORCEDETH_VERSION "0.64"
#define DRV_NAME "forcedeth"
#include <linux/module.h>
if (!(np->msi_flags & NV_MSI_X_ENABLED)) {
np->events = readl(base + NvRegIrqStatus);
- writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
+ writel(np->events, base + NvRegIrqStatus);
} else {
np->events = readl(base + NvRegMSIXIrqStatus);
- writel(NVREG_IRQSTAT_MASK, base + NvRegMSIXIrqStatus);
+ writel(np->events, base + NvRegMSIXIrqStatus);
}
dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, np->events);
if (!(np->events & np->irqmask))
nv_msi_workaround(np);
#ifdef CONFIG_FORCEDETH_NAPI
- spin_lock(&np->lock);
napi_schedule(&np->napi);
/* Disable furthur irq's
(msix not enabled with napi) */
writel(0, base + NvRegIrqMask);
- spin_unlock(&np->lock);
-
#else
do
{
if (!(np->msi_flags & NV_MSI_X_ENABLED)) {
np->events = readl(base + NvRegIrqStatus);
- writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
+ writel(np->events, base + NvRegIrqStatus);
} else {
np->events = readl(base + NvRegMSIXIrqStatus);
- writel(NVREG_IRQSTAT_MASK, base + NvRegMSIXIrqStatus);
+ writel(np->events, base + NvRegMSIXIrqStatus);
}
dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, np->events);
if (!(np->events & np->irqmask))
nv_msi_workaround(np);
#ifdef CONFIG_FORCEDETH_NAPI
- spin_lock(&np->lock);
napi_schedule(&np->napi);
/* Disable furthur irq's
(msix not enabled with napi) */
writel(0, base + NvRegIrqMask);
- spin_unlock(&np->lock);
-
#else
do
{
if (rx_work < budget) {
/* re-enable interrupts
(msix not enabled in napi) */
- spin_lock_irqsave(&np->lock, flags);
-
__napi_complete(napi);
writel(np->irqmask, base + NvRegIrqMask);
-
- spin_unlock_irqrestore(&np->lock, flags);
}
return rx_work;
}