diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-02-06 04:30:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-06 04:30:01 -0500 |
commit | 79d30a581fc405fc63322622cb1517d95ed8f5ce (patch) | |
tree | 8db484b6d53d0f07584d230cc46e829f5fee6b4b /drivers | |
parent | ddb213f0768dc8b10cab37a21b85b567f1966d4a (diff) |
forcedeth: don't clear nic_poll_irq too early
Impact: fix bug
for msix, we still need that flag to enable irq respectively
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/forcedeth.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 3a733a58456a..2d5f7d42e92a 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -4057,8 +4057,6 @@ static void nv_do_nic_poll(unsigned long data) | |||
4057 | mask |= NVREG_IRQ_OTHER; | 4057 | mask |= NVREG_IRQ_OTHER; |
4058 | } | 4058 | } |
4059 | } | 4059 | } |
4060 | np->nic_poll_irq = 0; | ||
4061 | |||
4062 | /* disable_irq() contains synchronize_irq, thus no irq handler can run now */ | 4060 | /* disable_irq() contains synchronize_irq, thus no irq handler can run now */ |
4063 | 4061 | ||
4064 | if (np->recover_error) { | 4062 | if (np->recover_error) { |
@@ -4096,11 +4094,11 @@ static void nv_do_nic_poll(unsigned long data) | |||
4096 | } | 4094 | } |
4097 | } | 4095 | } |
4098 | 4096 | ||
4099 | |||
4100 | writel(mask, base + NvRegIrqMask); | 4097 | writel(mask, base + NvRegIrqMask); |
4101 | pci_push(base); | 4098 | pci_push(base); |
4102 | 4099 | ||
4103 | if (!using_multi_irqs(dev)) { | 4100 | if (!using_multi_irqs(dev)) { |
4101 | np->nic_poll_irq = 0; | ||
4104 | if (nv_optimized(np)) | 4102 | if (nv_optimized(np)) |
4105 | nv_nic_irq_optimized(0, dev); | 4103 | nv_nic_irq_optimized(0, dev); |
4106 | else | 4104 | else |
@@ -4111,18 +4109,22 @@ static void nv_do_nic_poll(unsigned long data) | |||
4111 | enable_irq_lockdep(np->pci_dev->irq); | 4109 | enable_irq_lockdep(np->pci_dev->irq); |
4112 | } else { | 4110 | } else { |
4113 | if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { | 4111 | if (np->nic_poll_irq & NVREG_IRQ_RX_ALL) { |
4112 | np->nic_poll_irq &= ~NVREG_IRQ_RX_ALL; | ||
4114 | nv_nic_irq_rx(0, dev); | 4113 | nv_nic_irq_rx(0, dev); |
4115 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); | 4114 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector); |
4116 | } | 4115 | } |
4117 | if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { | 4116 | if (np->nic_poll_irq & NVREG_IRQ_TX_ALL) { |
4117 | np->nic_poll_irq &= ~NVREG_IRQ_TX_ALL; | ||
4118 | nv_nic_irq_tx(0, dev); | 4118 | nv_nic_irq_tx(0, dev); |
4119 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); | 4119 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector); |
4120 | } | 4120 | } |
4121 | if (np->nic_poll_irq & NVREG_IRQ_OTHER) { | 4121 | if (np->nic_poll_irq & NVREG_IRQ_OTHER) { |
4122 | np->nic_poll_irq &= ~NVREG_IRQ_OTHER; | ||
4122 | nv_nic_irq_other(0, dev); | 4123 | nv_nic_irq_other(0, dev); |
4123 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); | 4124 | enable_irq_lockdep(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector); |
4124 | } | 4125 | } |
4125 | } | 4126 | } |
4127 | |||
4126 | } | 4128 | } |
4127 | 4129 | ||
4128 | #ifdef CONFIG_NET_POLL_CONTROLLER | 4130 | #ifdef CONFIG_NET_POLL_CONTROLLER |