Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135148
b: refs/heads/master
c: 1b2bb76
h: refs/heads/master
v: v3
  • Loading branch information
Ayaz Abdulla authored and David S. Miller committed Mar 10, 2009
1 parent 335b842 commit 4aa681c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cef67a02f7994c97dbd716dbeb592265fb5b7b0
refs/heads/master: 1b2bb76f575699eff3f58b18dcfebf5d3b1f6ddb
18 changes: 4 additions & 14 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3464,10 +3464,10 @@ static irqreturn_t nv_nic_irq(int foo, void *data)

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))
Expand All @@ -3476,15 +3476,12 @@ static irqreturn_t nv_nic_irq(int foo, void *data)
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
{
Expand Down Expand Up @@ -3568,10 +3565,10 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data)

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))
Expand All @@ -3580,15 +3577,12 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data)
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
{
Expand Down Expand Up @@ -3758,13 +3752,9 @@ static int nv_napi_poll(struct napi_struct *napi, int budget)
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;
}
Expand Down

0 comments on commit 4aa681c

Please sign in to comment.