diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index a257babd1bb4..ac90a3828f69 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -58,8 +58,8 @@ | |||
58 | #include "bnx2_fw.h" | 58 | #include "bnx2_fw.h" |
59 | 59 | ||
60 | #define DRV_MODULE_NAME "bnx2" | 60 | #define DRV_MODULE_NAME "bnx2" |
61 | #define DRV_MODULE_VERSION "2.0.8" | 61 | #define DRV_MODULE_VERSION "2.0.9" |
62 | #define DRV_MODULE_RELDATE "Feb 15, 2010" | 62 | #define DRV_MODULE_RELDATE "April 27, 2010" |
63 | #define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-5.0.0.j6.fw" | 63 | #define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-5.0.0.j6.fw" |
64 | #define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-5.0.0.j3.fw" | 64 | #define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-5.0.0.j3.fw" |
65 | #define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-5.0.0.j9.fw" | 65 | #define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-5.0.0.j9.fw" |
@@ -651,9 +651,10 @@ bnx2_napi_enable(struct bnx2 *bp) | |||
651 | } | 651 | } |
652 | 652 | ||
653 | static void | 653 | static void |
654 | bnx2_netif_stop(struct bnx2 *bp) | 654 | bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic) |
655 | { | 655 | { |
656 | bnx2_cnic_stop(bp); | 656 | if (stop_cnic) |
657 | bnx2_cnic_stop(bp); | ||
657 | if (netif_running(bp->dev)) { | 658 | if (netif_running(bp->dev)) { |
658 | int i; | 659 | int i; |
659 | 660 | ||
@@ -671,14 +672,15 @@ bnx2_netif_stop(struct bnx2 *bp) | |||
671 | } | 672 | } |
672 | 673 | ||
673 | static void | 674 | static void |
674 | bnx2_netif_start(struct bnx2 *bp) | 675 | bnx2_netif_start(struct bnx2 *bp, bool start_cnic) |
675 | { | 676 | { |
676 | if (atomic_dec_and_test(&bp->intr_sem)) { | 677 | if (atomic_dec_and_test(&bp->intr_sem)) { |
677 | if (netif_running(bp->dev)) { | 678 | if (netif_running(bp->dev)) { |
678 | netif_tx_wake_all_queues(bp->dev); | 679 | netif_tx_wake_all_queues(bp->dev); |
679 | bnx2_napi_enable(bp); | 680 | bnx2_napi_enable(bp); |
680 | bnx2_enable_int(bp); | 681 | bnx2_enable_int(bp); |
681 | bnx2_cnic_start(bp); | 682 | if (start_cnic) |
683 | bnx2_cnic_start(bp); | ||
682 | } | 684 | } |
683 | } | 685 | } |
684 | } | 686 | } |
@@ -4759,8 +4761,12 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code) | |||
4759 | rc = bnx2_alloc_bad_rbuf(bp); | 4761 | rc = bnx2_alloc_bad_rbuf(bp); |
4760 | } | 4762 | } |
4761 | 4763 | ||
4762 | if (bp->flags & BNX2_FLAG_USING_MSIX) | 4764 | if (bp->flags & BNX2_FLAG_USING_MSIX) { |
4763 | bnx2_setup_msix_tbl(bp); | 4765 | bnx2_setup_msix_tbl(bp); |
4766 | /* Prevent MSIX table reads and write from timing out */ | ||
4767 | REG_WR(bp, BNX2_MISC_ECO_HW_CTL, | ||
4768 | BNX2_MISC_ECO_HW_CTL_LARGE_GRC_TMOUT_EN); | ||
4769 | } | ||
4764 | 4770 | ||
4765 | return rc; | 4771 | return rc; |
4766 | } | 4772 | } |
@@ -6273,12 +6279,12 @@ bnx2_reset_task(struct work_struct *work) | |||
6273 | return; | 6279 | return; |
6274 | } | 6280 | } |
6275 | 6281 | ||
6276 | bnx2_netif_stop(bp); | 6282 | bnx2_netif_stop(bp, true); |
6277 | 6283 | ||
6278 | bnx2_init_nic(bp, 1); | 6284 | bnx2_init_nic(bp, 1); |
6279 | 6285 | ||
6280 | atomic_set(&bp->intr_sem, 1); | 6286 | atomic_set(&bp->intr_sem, 1); |
6281 | bnx2_netif_start(bp); | 6287 | bnx2_netif_start(bp, true); |
6282 | rtnl_unlock(); | 6288 | rtnl_unlock(); |
6283 | } | 6289 | } |
6284 | 6290 | ||
@@ -6320,7 +6326,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) | |||
6320 | struct bnx2 *bp = netdev_priv(dev); | 6326 | struct bnx2 *bp = netdev_priv(dev); |
6321 | 6327 | ||
6322 | if (netif_running(dev)) | 6328 | if (netif_running(dev)) |
6323 | bnx2_netif_stop(bp); | 6329 | bnx2_netif_stop(bp, false); |
6324 | 6330 | ||
6325 | bp->vlgrp = vlgrp; | 6331 | bp->vlgrp = vlgrp; |
6326 | 6332 | ||
@@ -6331,7 +6337,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) | |||
6331 | if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) | 6337 | if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) |
6332 | bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1); | 6338 | bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1); |
6333 | 6339 | ||
6334 | bnx2_netif_start(bp); | 6340 | bnx2_netif_start(bp, false); |
6335 | } | 6341 | } |
6336 | #endif | 6342 | #endif |
6337 | 6343 | ||
@@ -7051,9 +7057,9 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal) | |||
7051 | bp->stats_ticks &= BNX2_HC_STATS_TICKS_HC_STAT_TICKS; | 7057 | bp->stats_ticks &= BNX2_HC_STATS_TICKS_HC_STAT_TICKS; |
7052 | 7058 | ||
7053 | if (netif_running(bp->dev)) { | 7059 | if (netif_running(bp->dev)) { |
7054 | bnx2_netif_stop(bp); | 7060 | bnx2_netif_stop(bp, true); |
7055 | bnx2_init_nic(bp, 0); | 7061 | bnx2_init_nic(bp, 0); |
7056 | bnx2_netif_start(bp); | 7062 | bnx2_netif_start(bp, true); |
7057 | } | 7063 | } |
7058 | 7064 | ||
7059 | return 0; | 7065 | return 0; |
@@ -7083,7 +7089,7 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx) | |||
7083 | /* Reset will erase chipset stats; save them */ | 7089 | /* Reset will erase chipset stats; save them */ |
7084 | bnx2_save_stats(bp); | 7090 | bnx2_save_stats(bp); |
7085 | 7091 | ||
7086 | bnx2_netif_stop(bp); | 7092 | bnx2_netif_stop(bp, true); |
7087 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET); | 7093 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET); |
7088 | bnx2_free_skbs(bp); | 7094 | bnx2_free_skbs(bp); |
7089 | bnx2_free_mem(bp); | 7095 | bnx2_free_mem(bp); |
@@ -7111,7 +7117,7 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx) | |||
7111 | bnx2_setup_cnic_irq_info(bp); | 7117 | bnx2_setup_cnic_irq_info(bp); |
7112 | mutex_unlock(&bp->cnic_lock); | 7118 | mutex_unlock(&bp->cnic_lock); |
7113 | #endif | 7119 | #endif |
7114 | bnx2_netif_start(bp); | 7120 | bnx2_netif_start(bp, true); |
7115 | } | 7121 | } |
7116 | return 0; | 7122 | return 0; |
7117 | } | 7123 | } |
@@ -7364,7 +7370,7 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf) | |||
7364 | if (etest->flags & ETH_TEST_FL_OFFLINE) { | 7370 | if (etest->flags & ETH_TEST_FL_OFFLINE) { |
7365 | int i; | 7371 | int i; |
7366 | 7372 | ||
7367 | bnx2_netif_stop(bp); | 7373 | bnx2_netif_stop(bp, true); |
7368 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_DIAG); | 7374 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_DIAG); |
7369 | bnx2_free_skbs(bp); | 7375 | bnx2_free_skbs(bp); |
7370 | 7376 | ||
@@ -7383,7 +7389,7 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf) | |||
7383 | bnx2_shutdown_chip(bp); | 7389 | bnx2_shutdown_chip(bp); |
7384 | else { | 7390 | else { |
7385 | bnx2_init_nic(bp, 1); | 7391 | bnx2_init_nic(bp, 1); |
7386 | bnx2_netif_start(bp); | 7392 | bnx2_netif_start(bp, true); |
7387 | } | 7393 | } |
7388 | 7394 | ||
7389 | /* wait for link up */ | 7395 | /* wait for link up */ |
@@ -8377,7 +8383,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8377 | return 0; | 8383 | return 0; |
8378 | 8384 | ||
8379 | flush_scheduled_work(); | 8385 | flush_scheduled_work(); |
8380 | bnx2_netif_stop(bp); | 8386 | bnx2_netif_stop(bp, true); |
8381 | netif_device_detach(dev); | 8387 | netif_device_detach(dev); |
8382 | del_timer_sync(&bp->timer); | 8388 | del_timer_sync(&bp->timer); |
8383 | bnx2_shutdown_chip(bp); | 8389 | bnx2_shutdown_chip(bp); |
@@ -8399,7 +8405,7 @@ bnx2_resume(struct pci_dev *pdev) | |||
8399 | bnx2_set_power_state(bp, PCI_D0); | 8405 | bnx2_set_power_state(bp, PCI_D0); |
8400 | netif_device_attach(dev); | 8406 | netif_device_attach(dev); |
8401 | bnx2_init_nic(bp, 1); | 8407 | bnx2_init_nic(bp, 1); |
8402 | bnx2_netif_start(bp); | 8408 | bnx2_netif_start(bp, true); |
8403 | return 0; | 8409 | return 0; |
8404 | } | 8410 | } |
8405 | 8411 | ||
@@ -8426,7 +8432,7 @@ static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev, | |||
8426 | } | 8432 | } |
8427 | 8433 | ||
8428 | if (netif_running(dev)) { | 8434 | if (netif_running(dev)) { |
8429 | bnx2_netif_stop(bp); | 8435 | bnx2_netif_stop(bp, true); |
8430 | del_timer_sync(&bp->timer); | 8436 | del_timer_sync(&bp->timer); |
8431 | bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET); | 8437 | bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET); |
8432 | } | 8438 | } |
@@ -8483,7 +8489,7 @@ static void bnx2_io_resume(struct pci_dev *pdev) | |||
8483 | 8489 | ||
8484 | rtnl_lock(); | 8490 | rtnl_lock(); |
8485 | if (netif_running(dev)) | 8491 | if (netif_running(dev)) |
8486 | bnx2_netif_start(bp); | 8492 | bnx2_netif_start(bp, true); |
8487 | 8493 | ||
8488 | netif_device_attach(dev); | 8494 | netif_device_attach(dev); |
8489 | rtnl_unlock(); | 8495 | rtnl_unlock(); |