diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-03 00:43:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-03 01:02:06 -0400 |
commit | 7ef527377b88ff05fb122a47619ea506c631c914 (patch) | |
tree | 2c2e774527d5f591b975834f43e8c6fd12fb38f2 /drivers/net/bnx2.c | |
parent | 47d29646a2c1c147d8a7598aeac2c87dd71ed638 (diff) | |
parent | 1183f3838c588545592c042c0ce15015661ce7f2 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
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 53326fed6c81..ab26bbc2a1d3 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 | } |
@@ -4758,8 +4760,12 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code) | |||
4758 | rc = bnx2_alloc_bad_rbuf(bp); | 4760 | rc = bnx2_alloc_bad_rbuf(bp); |
4759 | } | 4761 | } |
4760 | 4762 | ||
4761 | if (bp->flags & BNX2_FLAG_USING_MSIX) | 4763 | if (bp->flags & BNX2_FLAG_USING_MSIX) { |
4762 | bnx2_setup_msix_tbl(bp); | 4764 | bnx2_setup_msix_tbl(bp); |
4765 | /* Prevent MSIX table reads and write from timing out */ | ||
4766 | REG_WR(bp, BNX2_MISC_ECO_HW_CTL, | ||
4767 | BNX2_MISC_ECO_HW_CTL_LARGE_GRC_TMOUT_EN); | ||
4768 | } | ||
4763 | 4769 | ||
4764 | return rc; | 4770 | return rc; |
4765 | } | 4771 | } |
@@ -6272,12 +6278,12 @@ bnx2_reset_task(struct work_struct *work) | |||
6272 | return; | 6278 | return; |
6273 | } | 6279 | } |
6274 | 6280 | ||
6275 | bnx2_netif_stop(bp); | 6281 | bnx2_netif_stop(bp, true); |
6276 | 6282 | ||
6277 | bnx2_init_nic(bp, 1); | 6283 | bnx2_init_nic(bp, 1); |
6278 | 6284 | ||
6279 | atomic_set(&bp->intr_sem, 1); | 6285 | atomic_set(&bp->intr_sem, 1); |
6280 | bnx2_netif_start(bp); | 6286 | bnx2_netif_start(bp, true); |
6281 | rtnl_unlock(); | 6287 | rtnl_unlock(); |
6282 | } | 6288 | } |
6283 | 6289 | ||
@@ -6319,7 +6325,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) | |||
6319 | struct bnx2 *bp = netdev_priv(dev); | 6325 | struct bnx2 *bp = netdev_priv(dev); |
6320 | 6326 | ||
6321 | if (netif_running(dev)) | 6327 | if (netif_running(dev)) |
6322 | bnx2_netif_stop(bp); | 6328 | bnx2_netif_stop(bp, false); |
6323 | 6329 | ||
6324 | bp->vlgrp = vlgrp; | 6330 | bp->vlgrp = vlgrp; |
6325 | 6331 | ||
@@ -6330,7 +6336,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp) | |||
6330 | if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) | 6336 | if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) |
6331 | bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1); | 6337 | bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1); |
6332 | 6338 | ||
6333 | bnx2_netif_start(bp); | 6339 | bnx2_netif_start(bp, false); |
6334 | } | 6340 | } |
6335 | #endif | 6341 | #endif |
6336 | 6342 | ||
@@ -7050,9 +7056,9 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal) | |||
7050 | bp->stats_ticks &= BNX2_HC_STATS_TICKS_HC_STAT_TICKS; | 7056 | bp->stats_ticks &= BNX2_HC_STATS_TICKS_HC_STAT_TICKS; |
7051 | 7057 | ||
7052 | if (netif_running(bp->dev)) { | 7058 | if (netif_running(bp->dev)) { |
7053 | bnx2_netif_stop(bp); | 7059 | bnx2_netif_stop(bp, true); |
7054 | bnx2_init_nic(bp, 0); | 7060 | bnx2_init_nic(bp, 0); |
7055 | bnx2_netif_start(bp); | 7061 | bnx2_netif_start(bp, true); |
7056 | } | 7062 | } |
7057 | 7063 | ||
7058 | return 0; | 7064 | return 0; |
@@ -7082,7 +7088,7 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx) | |||
7082 | /* Reset will erase chipset stats; save them */ | 7088 | /* Reset will erase chipset stats; save them */ |
7083 | bnx2_save_stats(bp); | 7089 | bnx2_save_stats(bp); |
7084 | 7090 | ||
7085 | bnx2_netif_stop(bp); | 7091 | bnx2_netif_stop(bp, true); |
7086 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET); | 7092 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET); |
7087 | bnx2_free_skbs(bp); | 7093 | bnx2_free_skbs(bp); |
7088 | bnx2_free_mem(bp); | 7094 | bnx2_free_mem(bp); |
@@ -7110,7 +7116,7 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx) | |||
7110 | bnx2_setup_cnic_irq_info(bp); | 7116 | bnx2_setup_cnic_irq_info(bp); |
7111 | mutex_unlock(&bp->cnic_lock); | 7117 | mutex_unlock(&bp->cnic_lock); |
7112 | #endif | 7118 | #endif |
7113 | bnx2_netif_start(bp); | 7119 | bnx2_netif_start(bp, true); |
7114 | } | 7120 | } |
7115 | return 0; | 7121 | return 0; |
7116 | } | 7122 | } |
@@ -7363,7 +7369,7 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf) | |||
7363 | if (etest->flags & ETH_TEST_FL_OFFLINE) { | 7369 | if (etest->flags & ETH_TEST_FL_OFFLINE) { |
7364 | int i; | 7370 | int i; |
7365 | 7371 | ||
7366 | bnx2_netif_stop(bp); | 7372 | bnx2_netif_stop(bp, true); |
7367 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_DIAG); | 7373 | bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_DIAG); |
7368 | bnx2_free_skbs(bp); | 7374 | bnx2_free_skbs(bp); |
7369 | 7375 | ||
@@ -7382,7 +7388,7 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf) | |||
7382 | bnx2_shutdown_chip(bp); | 7388 | bnx2_shutdown_chip(bp); |
7383 | else { | 7389 | else { |
7384 | bnx2_init_nic(bp, 1); | 7390 | bnx2_init_nic(bp, 1); |
7385 | bnx2_netif_start(bp); | 7391 | bnx2_netif_start(bp, true); |
7386 | } | 7392 | } |
7387 | 7393 | ||
7388 | /* wait for link up */ | 7394 | /* wait for link up */ |
@@ -8376,7 +8382,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
8376 | return 0; | 8382 | return 0; |
8377 | 8383 | ||
8378 | flush_scheduled_work(); | 8384 | flush_scheduled_work(); |
8379 | bnx2_netif_stop(bp); | 8385 | bnx2_netif_stop(bp, true); |
8380 | netif_device_detach(dev); | 8386 | netif_device_detach(dev); |
8381 | del_timer_sync(&bp->timer); | 8387 | del_timer_sync(&bp->timer); |
8382 | bnx2_shutdown_chip(bp); | 8388 | bnx2_shutdown_chip(bp); |
@@ -8398,7 +8404,7 @@ bnx2_resume(struct pci_dev *pdev) | |||
8398 | bnx2_set_power_state(bp, PCI_D0); | 8404 | bnx2_set_power_state(bp, PCI_D0); |
8399 | netif_device_attach(dev); | 8405 | netif_device_attach(dev); |
8400 | bnx2_init_nic(bp, 1); | 8406 | bnx2_init_nic(bp, 1); |
8401 | bnx2_netif_start(bp); | 8407 | bnx2_netif_start(bp, true); |
8402 | return 0; | 8408 | return 0; |
8403 | } | 8409 | } |
8404 | 8410 | ||
@@ -8425,7 +8431,7 @@ static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev, | |||
8425 | } | 8431 | } |
8426 | 8432 | ||
8427 | if (netif_running(dev)) { | 8433 | if (netif_running(dev)) { |
8428 | bnx2_netif_stop(bp); | 8434 | bnx2_netif_stop(bp, true); |
8429 | del_timer_sync(&bp->timer); | 8435 | del_timer_sync(&bp->timer); |
8430 | bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET); | 8436 | bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET); |
8431 | } | 8437 | } |
@@ -8482,7 +8488,7 @@ static void bnx2_io_resume(struct pci_dev *pdev) | |||
8482 | 8488 | ||
8483 | rtnl_lock(); | 8489 | rtnl_lock(); |
8484 | if (netif_running(dev)) | 8490 | if (netif_running(dev)) |
8485 | bnx2_netif_start(bp); | 8491 | bnx2_netif_start(bp, true); |
8486 | 8492 | ||
8487 | netif_device_attach(dev); | 8493 | netif_device_attach(dev); |
8488 | rtnl_unlock(); | 8494 | rtnl_unlock(); |