diff options
author | Eilon Greenstein <eilong@broadcom.com> | 2009-10-15 03:18:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-15 03:18:47 -0400 |
commit | 061bc702f6912b6e45b9aaf1c9bf2f8122406d47 (patch) | |
tree | dde7adf887e08b7d7ceeff445a2731abf461f803 /drivers/net | |
parent | c4ff7cbf88be8bb0e3f942089f0ef0a40d98d654 (diff) |
bnx2x: Do not call load/unload functionality from DCC
There is really no need to clear the MAC or the FW filtering rules - it was
added for completion, but caused race conditions with load/unload. Removing this
redundant code
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/bnx2x_main.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 7c5c3000bbb4..42cd957c668b 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -2565,21 +2565,12 @@ static void bnx2x_set_rx_mode(struct net_device *dev); | |||
2565 | static void bnx2x_e1h_disable(struct bnx2x *bp) | 2565 | static void bnx2x_e1h_disable(struct bnx2x *bp) |
2566 | { | 2566 | { |
2567 | int port = BP_PORT(bp); | 2567 | int port = BP_PORT(bp); |
2568 | int i; | ||
2569 | |||
2570 | bp->rx_mode = BNX2X_RX_MODE_NONE; | ||
2571 | bnx2x_set_storm_rx_mode(bp); | ||
2572 | 2568 | ||
2573 | netif_tx_disable(bp->dev); | 2569 | netif_tx_disable(bp->dev); |
2574 | bp->dev->trans_start = jiffies; /* prevent tx timeout */ | 2570 | bp->dev->trans_start = jiffies; /* prevent tx timeout */ |
2575 | 2571 | ||
2576 | REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0); | 2572 | REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 0); |
2577 | 2573 | ||
2578 | bnx2x_set_eth_mac_addr_e1h(bp, 0); | ||
2579 | |||
2580 | for (i = 0; i < MC_HASH_SIZE; i++) | ||
2581 | REG_WR(bp, MC_HASH_OFFSET(bp, i), 0); | ||
2582 | |||
2583 | netif_carrier_off(bp->dev); | 2574 | netif_carrier_off(bp->dev); |
2584 | } | 2575 | } |
2585 | 2576 | ||
@@ -2589,13 +2580,13 @@ static void bnx2x_e1h_enable(struct bnx2x *bp) | |||
2589 | 2580 | ||
2590 | REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 1); | 2581 | REG_WR(bp, NIG_REG_LLH0_FUNC_EN + port*8, 1); |
2591 | 2582 | ||
2592 | bnx2x_set_eth_mac_addr_e1h(bp, 1); | ||
2593 | |||
2594 | /* Tx queue should be only reenabled */ | 2583 | /* Tx queue should be only reenabled */ |
2595 | netif_tx_wake_all_queues(bp->dev); | 2584 | netif_tx_wake_all_queues(bp->dev); |
2596 | 2585 | ||
2597 | /* Initialize the receive filter. */ | 2586 | /* |
2598 | bnx2x_set_rx_mode(bp->dev); | 2587 | * Should not call netif_carrier_on since it will be called if the link |
2588 | * is up when checking for link state | ||
2589 | */ | ||
2599 | } | 2590 | } |
2600 | 2591 | ||
2601 | static void bnx2x_update_min_max(struct bnx2x *bp) | 2592 | static void bnx2x_update_min_max(struct bnx2x *bp) |
@@ -10538,7 +10529,7 @@ static void bnx2x_self_test(struct net_device *dev, | |||
10538 | /* disable input for TX port IF */ | 10529 | /* disable input for TX port IF */ |
10539 | REG_WR(bp, NIG_REG_EGRESS_UMP0_IN_EN + port*4, 0); | 10530 | REG_WR(bp, NIG_REG_EGRESS_UMP0_IN_EN + port*4, 0); |
10540 | 10531 | ||
10541 | link_up = bp->link_vars.link_up; | 10532 | link_up = (bnx2x_link_test(bp) == 0); |
10542 | bnx2x_nic_unload(bp, UNLOAD_NORMAL); | 10533 | bnx2x_nic_unload(bp, UNLOAD_NORMAL); |
10543 | bnx2x_nic_load(bp, LOAD_DIAG); | 10534 | bnx2x_nic_load(bp, LOAD_DIAG); |
10544 | /* wait until link state is restored */ | 10535 | /* wait until link state is restored */ |