diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-07 02:53:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-07 02:53:30 -0400 |
commit | 4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch) | |
tree | 9b75f5d5636004d9a9aa496924377379be09aa1f /drivers/net/bnx2.c | |
parent | b4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff) | |
parent | fb9e2d887243499b8d28efcf80821c4f6a092395 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bonding/bond_main.c
drivers/net/via-velocity.c
drivers/net/wireless/iwlwifi/iwl-agn.c
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 0b69ffb7951d..802b538502eb 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -246,6 +246,8 @@ static const struct flash_spec flash_5709 = { | |||
246 | 246 | ||
247 | MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); | 247 | MODULE_DEVICE_TABLE(pci, bnx2_pci_tbl); |
248 | 248 | ||
249 | static void bnx2_init_napi(struct bnx2 *bp); | ||
250 | |||
249 | static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) | 251 | static inline u32 bnx2_tx_avail(struct bnx2 *bp, struct bnx2_tx_ring_info *txr) |
250 | { | 252 | { |
251 | u32 diff; | 253 | u32 diff; |
@@ -6196,6 +6198,7 @@ bnx2_open(struct net_device *dev) | |||
6196 | bnx2_disable_int(bp); | 6198 | bnx2_disable_int(bp); |
6197 | 6199 | ||
6198 | bnx2_setup_int_mode(bp, disable_msi); | 6200 | bnx2_setup_int_mode(bp, disable_msi); |
6201 | bnx2_init_napi(bp); | ||
6199 | bnx2_napi_enable(bp); | 6202 | bnx2_napi_enable(bp); |
6200 | rc = bnx2_alloc_mem(bp); | 6203 | rc = bnx2_alloc_mem(bp); |
6201 | if (rc) | 6204 | if (rc) |
@@ -7642,9 +7645,11 @@ poll_bnx2(struct net_device *dev) | |||
7642 | int i; | 7645 | int i; |
7643 | 7646 | ||
7644 | for (i = 0; i < bp->irq_nvecs; i++) { | 7647 | for (i = 0; i < bp->irq_nvecs; i++) { |
7645 | disable_irq(bp->irq_tbl[i].vector); | 7648 | struct bnx2_irq *irq = &bp->irq_tbl[i]; |
7646 | bnx2_interrupt(bp->irq_tbl[i].vector, &bp->bnx2_napi[i]); | 7649 | |
7647 | enable_irq(bp->irq_tbl[i].vector); | 7650 | disable_irq(irq->vector); |
7651 | irq->handler(irq->vector, &bp->bnx2_napi[i]); | ||
7652 | enable_irq(irq->vector); | ||
7648 | } | 7653 | } |
7649 | } | 7654 | } |
7650 | #endif | 7655 | #endif |
@@ -8206,7 +8211,7 @@ bnx2_init_napi(struct bnx2 *bp) | |||
8206 | { | 8211 | { |
8207 | int i; | 8212 | int i; |
8208 | 8213 | ||
8209 | for (i = 0; i < BNX2_MAX_MSIX_VEC; i++) { | 8214 | for (i = 0; i < bp->irq_nvecs; i++) { |
8210 | struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; | 8215 | struct bnx2_napi *bnapi = &bp->bnx2_napi[i]; |
8211 | int (*poll)(struct napi_struct *, int); | 8216 | int (*poll)(struct napi_struct *, int); |
8212 | 8217 | ||
@@ -8275,7 +8280,6 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
8275 | dev->ethtool_ops = &bnx2_ethtool_ops; | 8280 | dev->ethtool_ops = &bnx2_ethtool_ops; |
8276 | 8281 | ||
8277 | bp = netdev_priv(dev); | 8282 | bp = netdev_priv(dev); |
8278 | bnx2_init_napi(bp); | ||
8279 | 8283 | ||
8280 | pci_set_drvdata(pdev, dev); | 8284 | pci_set_drvdata(pdev, dev); |
8281 | 8285 | ||