aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Brandeburg <jesse.brandeburg@intel.com>2009-03-13 18:13:49 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-14 15:41:10 -0400
commit4dd64df8954cc6d485f7c98ab18e0480f0c7d865 (patch)
tree46715cd207d6dc1998a5caa93e12c866c3199724
parent509ee935ec0828e534e4d48d08d4d0b4bc17ea92 (diff)
ixgbe: fix bug with napi add before request_irq
Occasionally if the driver was loaded in a system that didn't support MSI-X or MSI and was on a shared interrupt, the driver would then panic in NAPI on the first shared interrupt because we hadn't called napi_add yet. Solution: call napi_add before calling request_irq Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 76fd5c6db02..cd215200b0e 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2339,8 +2339,6 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
2339 else 2339 else
2340 ixgbe_configure_msi_and_legacy(adapter); 2340 ixgbe_configure_msi_and_legacy(adapter);
2341 2341
2342 ixgbe_napi_add_all(adapter);
2343
2344 clear_bit(__IXGBE_DOWN, &adapter->state); 2342 clear_bit(__IXGBE_DOWN, &adapter->state);
2345 ixgbe_napi_enable_all(adapter); 2343 ixgbe_napi_enable_all(adapter);
2346 2344
@@ -2397,6 +2395,8 @@ int ixgbe_up(struct ixgbe_adapter *adapter)
2397 /* hardware has been reset, we need to reload some things */ 2395 /* hardware has been reset, we need to reload some things */
2398 ixgbe_configure(adapter); 2396 ixgbe_configure(adapter);
2399 2397
2398 ixgbe_napi_add_all(adapter);
2399
2400 return ixgbe_up_complete(adapter); 2400 return ixgbe_up_complete(adapter);
2401} 2401}
2402 2402
@@ -3426,6 +3426,8 @@ static int ixgbe_open(struct net_device *netdev)
3426 3426
3427 ixgbe_configure(adapter); 3427 ixgbe_configure(adapter);
3428 3428
3429 ixgbe_napi_add_all(adapter);
3430
3429 err = ixgbe_request_irq(adapter); 3431 err = ixgbe_request_irq(adapter);
3430 if (err) 3432 if (err)
3431 goto err_req_irq; 3433 goto err_req_irq;
@@ -3480,6 +3482,7 @@ static int ixgbe_close(struct net_device *netdev)
3480/** 3482/**
3481 * ixgbe_napi_add_all - prep napi structs for use 3483 * ixgbe_napi_add_all - prep napi structs for use
3482 * @adapter: private struct 3484 * @adapter: private struct
3485 *
3483 * helper function to napi_add each possible q_vector->napi 3486 * helper function to napi_add each possible q_vector->napi
3484 */ 3487 */
3485void ixgbe_napi_add_all(struct ixgbe_adapter *adapter) 3488void ixgbe_napi_add_all(struct ixgbe_adapter *adapter)
@@ -3552,7 +3555,6 @@ static int ixgbe_resume(struct pci_dev *pdev)
3552 return err; 3555 return err;
3553 } 3556 }
3554 3557
3555 ixgbe_napi_add_all(adapter);
3556 ixgbe_reset(adapter); 3558 ixgbe_reset(adapter);
3557 3559
3558 if (netif_running(netdev)) { 3560 if (netif_running(netdev)) {