diff options
Diffstat (limited to 'drivers/net/cxgb3/cxgb3_main.c')
-rw-r--r-- | drivers/net/cxgb3/cxgb3_main.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/net/cxgb3/cxgb3_main.c b/drivers/net/cxgb3/cxgb3_main.c index ce949d5fae39..d67fc10a6b36 100644 --- a/drivers/net/cxgb3/cxgb3_main.c +++ b/drivers/net/cxgb3/cxgb3_main.c | |||
@@ -421,6 +421,13 @@ static void init_napi(struct adapter *adap) | |||
421 | netif_napi_add(qs->netdev, &qs->napi, qs->napi.poll, | 421 | netif_napi_add(qs->netdev, &qs->napi, qs->napi.poll, |
422 | 64); | 422 | 64); |
423 | } | 423 | } |
424 | |||
425 | /* | ||
426 | * netif_napi_add() can be called only once per napi_struct because it | ||
427 | * adds each new napi_struct to a list. Be careful not to call it a | ||
428 | * second time, e.g., during EEH recovery, by making a note of it. | ||
429 | */ | ||
430 | adap->flags |= NAPI_INIT; | ||
424 | } | 431 | } |
425 | 432 | ||
426 | /* | 433 | /* |
@@ -896,7 +903,8 @@ static int cxgb_up(struct adapter *adap) | |||
896 | goto out; | 903 | goto out; |
897 | 904 | ||
898 | setup_rss(adap); | 905 | setup_rss(adap); |
899 | init_napi(adap); | 906 | if (!(adap->flags & NAPI_INIT)) |
907 | init_napi(adap); | ||
900 | adap->flags |= FULL_INIT_DONE; | 908 | adap->flags |= FULL_INIT_DONE; |
901 | } | 909 | } |
902 | 910 | ||
@@ -999,7 +1007,7 @@ static int offload_open(struct net_device *dev) | |||
999 | return 0; | 1007 | return 0; |
1000 | 1008 | ||
1001 | if (!adap_up && (err = cxgb_up(adapter)) < 0) | 1009 | if (!adap_up && (err = cxgb_up(adapter)) < 0) |
1002 | return err; | 1010 | goto out; |
1003 | 1011 | ||
1004 | t3_tp_set_offload_mode(adapter, 1); | 1012 | t3_tp_set_offload_mode(adapter, 1); |
1005 | tdev->lldev = adapter->port[0]; | 1013 | tdev->lldev = adapter->port[0]; |
@@ -1061,10 +1069,8 @@ static int cxgb_open(struct net_device *dev) | |||
1061 | int other_ports = adapter->open_device_map & PORT_MASK; | 1069 | int other_ports = adapter->open_device_map & PORT_MASK; |
1062 | int err; | 1070 | int err; |
1063 | 1071 | ||
1064 | if (!adapter->open_device_map && (err = cxgb_up(adapter)) < 0) { | 1072 | if (!adapter->open_device_map && (err = cxgb_up(adapter)) < 0) |
1065 | quiesce_rx(adapter); | ||
1066 | return err; | 1073 | return err; |
1067 | } | ||
1068 | 1074 | ||
1069 | set_bit(pi->port_id, &adapter->open_device_map); | 1075 | set_bit(pi->port_id, &adapter->open_device_map); |
1070 | if (is_offload(adapter) && !ofld_disable) { | 1076 | if (is_offload(adapter) && !ofld_disable) { |
@@ -2431,7 +2437,7 @@ static pci_ers_result_t t3_io_error_detected(struct pci_dev *pdev, | |||
2431 | 2437 | ||
2432 | pci_disable_device(pdev); | 2438 | pci_disable_device(pdev); |
2433 | 2439 | ||
2434 | /* Request a slot slot reset. */ | 2440 | /* Request a slot reset. */ |
2435 | return PCI_ERS_RESULT_NEED_RESET; | 2441 | return PCI_ERS_RESULT_NEED_RESET; |
2436 | } | 2442 | } |
2437 | 2443 | ||
@@ -2448,13 +2454,16 @@ static pci_ers_result_t t3_io_slot_reset(struct pci_dev *pdev) | |||
2448 | if (pci_enable_device(pdev)) { | 2454 | if (pci_enable_device(pdev)) { |
2449 | dev_err(&pdev->dev, | 2455 | dev_err(&pdev->dev, |
2450 | "Cannot re-enable PCI device after reset.\n"); | 2456 | "Cannot re-enable PCI device after reset.\n"); |
2451 | return PCI_ERS_RESULT_DISCONNECT; | 2457 | goto err; |
2452 | } | 2458 | } |
2453 | pci_set_master(pdev); | 2459 | pci_set_master(pdev); |
2454 | 2460 | ||
2455 | t3_prep_adapter(adapter, adapter->params.info, 1); | 2461 | if (t3_prep_adapter(adapter, adapter->params.info, 1)) |
2462 | goto err; | ||
2456 | 2463 | ||
2457 | return PCI_ERS_RESULT_RECOVERED; | 2464 | return PCI_ERS_RESULT_RECOVERED; |
2465 | err: | ||
2466 | return PCI_ERS_RESULT_DISCONNECT; | ||
2458 | } | 2467 | } |
2459 | 2468 | ||
2460 | /** | 2469 | /** |
@@ -2483,13 +2492,6 @@ static void t3_io_resume(struct pci_dev *pdev) | |||
2483 | netif_device_attach(netdev); | 2492 | netif_device_attach(netdev); |
2484 | } | 2493 | } |
2485 | } | 2494 | } |
2486 | |||
2487 | if (is_offload(adapter)) { | ||
2488 | __set_bit(OFFLOAD_DEVMAP_BIT, &adapter->registered_device_map); | ||
2489 | if (offload_open(adapter->port[0])) | ||
2490 | printk(KERN_WARNING | ||
2491 | "Could not bring back offload capabilities\n"); | ||
2492 | } | ||
2493 | } | 2495 | } |
2494 | 2496 | ||
2495 | static struct pci_error_handlers t3_err_handler = { | 2497 | static struct pci_error_handlers t3_err_handler = { |