forcedeth: remove isr processing loop
This patch is only a subset of changes so that it is easier to see the modifications. This patch removes the isr 'for' loop and shifts all the logic to account for new tab spacing. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9e184767c9
commit
b67874ac16
|
@ -3423,11 +3423,9 @@ static irqreturn_t nv_nic_irq(int foo, void *data)
|
|||
struct net_device *dev = (struct net_device *) data;
|
||||
struct fe_priv *np = netdev_priv(dev);
|
||||
u8 __iomem *base = get_hwbase(dev);
|
||||
int i;
|
||||
|
||||
dprintk(KERN_DEBUG "%s: nv_nic_irq\n", dev->name);
|
||||
|
||||
for (i=0; ; i++) {
|
||||
if (!(np->msi_flags & NV_MSI_X_ENABLED)) {
|
||||
np->events = readl(base + NvRegIrqStatus);
|
||||
writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
|
||||
|
@ -3437,7 +3435,7 @@ static irqreturn_t nv_nic_irq(int foo, void *data)
|
|||
}
|
||||
dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, np->events);
|
||||
if (!(np->events & np->irqmask))
|
||||
break;
|
||||
return IRQ_NONE;
|
||||
|
||||
nv_msi_workaround(np);
|
||||
|
||||
|
@ -3492,30 +3490,11 @@ static irqreturn_t nv_nic_irq(int foo, void *data)
|
|||
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
|
||||
}
|
||||
spin_unlock(&np->lock);
|
||||
break;
|
||||
}
|
||||
if (unlikely(i > max_interrupt_work)) {
|
||||
spin_lock(&np->lock);
|
||||
/* disable interrupts on the nic */
|
||||
if (!(np->msi_flags & NV_MSI_X_ENABLED))
|
||||
writel(0, base + NvRegIrqMask);
|
||||
else
|
||||
writel(np->irqmask, base + NvRegIrqMask);
|
||||
pci_push(base);
|
||||
|
||||
if (!np->in_shutdown) {
|
||||
np->nic_poll_irq = np->irqmask;
|
||||
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
|
||||
}
|
||||
spin_unlock(&np->lock);
|
||||
printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
dprintk(KERN_DEBUG "%s: nv_nic_irq completed\n", dev->name);
|
||||
|
||||
return IRQ_RETVAL(i);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3528,11 +3507,9 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data)
|
|||
struct net_device *dev = (struct net_device *) data;
|
||||
struct fe_priv *np = netdev_priv(dev);
|
||||
u8 __iomem *base = get_hwbase(dev);
|
||||
int i;
|
||||
|
||||
dprintk(KERN_DEBUG "%s: nv_nic_irq_optimized\n", dev->name);
|
||||
|
||||
for (i=0; ; i++) {
|
||||
if (!(np->msi_flags & NV_MSI_X_ENABLED)) {
|
||||
np->events = readl(base + NvRegIrqStatus);
|
||||
writel(NVREG_IRQSTAT_MASK, base + NvRegIrqStatus);
|
||||
|
@ -3542,7 +3519,7 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data)
|
|||
}
|
||||
dprintk(KERN_DEBUG "%s: irq: %08x\n", dev->name, np->events);
|
||||
if (!(np->events & np->irqmask))
|
||||
break;
|
||||
return IRQ_NONE;
|
||||
|
||||
nv_msi_workaround(np);
|
||||
|
||||
|
@ -3597,31 +3574,12 @@ static irqreturn_t nv_nic_irq_optimized(int foo, void *data)
|
|||
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
|
||||
}
|
||||
spin_unlock(&np->lock);
|
||||
break;
|
||||
}
|
||||
|
||||
if (unlikely(i > max_interrupt_work)) {
|
||||
spin_lock(&np->lock);
|
||||
/* disable interrupts on the nic */
|
||||
if (!(np->msi_flags & NV_MSI_X_ENABLED))
|
||||
writel(0, base + NvRegIrqMask);
|
||||
else
|
||||
writel(np->irqmask, base + NvRegIrqMask);
|
||||
pci_push(base);
|
||||
|
||||
if (!np->in_shutdown) {
|
||||
np->nic_poll_irq = np->irqmask;
|
||||
mod_timer(&np->nic_poll, jiffies + POLL_WAIT);
|
||||
}
|
||||
spin_unlock(&np->lock);
|
||||
printk(KERN_DEBUG "%s: too many iterations (%d) in nv_nic_irq.\n", dev->name, i);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
dprintk(KERN_DEBUG "%s: nv_nic_irq_optimized completed\n", dev->name);
|
||||
|
||||
return IRQ_RETVAL(i);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t nv_nic_irq_tx(int foo, void *data)
|
||||
|
|
Reference in New Issue