diff options
author | Vladislav Zolotarov <vladz@broadcom.com> | 2011-02-06 14:25:41 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-06 14:25:41 -0500 |
commit | 6e30dd4e3935ddb4e7dd27d5be7a6e5504e64a27 (patch) | |
tree | 9ce171d9f20bec820fe1ca0ae565ffb474e8214f /drivers/net/bnx2x/bnx2x_cmn.c | |
parent | a8c94b9188bf6012d9b6c3d37f324bd6c7d2924e (diff) |
bnx2x: Proper netdev->ndo_set_rx_mode() implementation.
Completed the bnx2x_set_rx_mode() to a proper netdev->ndo_set_rx_mode
implementation:
- Added a missing configuration of a unicast MAC addresses list.
- Changed bp->dma_lock from being a mutex to a spinlock as long as it's taken
under netdev->addr_list_lock now.
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_cmn.c')
-rw-r--r-- | drivers/net/bnx2x/bnx2x_cmn.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/bnx2x/bnx2x_cmn.c b/drivers/net/bnx2x/bnx2x_cmn.c index 844afcec79b4..6fac8e183c59 100644 --- a/drivers/net/bnx2x/bnx2x_cmn.c +++ b/drivers/net/bnx2x/bnx2x_cmn.c | |||
@@ -1452,28 +1452,35 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode) | |||
1452 | 1452 | ||
1453 | bnx2x_set_eth_mac(bp, 1); | 1453 | bnx2x_set_eth_mac(bp, 1); |
1454 | 1454 | ||
1455 | /* Clear MC configuration */ | ||
1456 | if (CHIP_IS_E1(bp)) | ||
1457 | bnx2x_invalidate_e1_mc_list(bp); | ||
1458 | else | ||
1459 | bnx2x_invalidate_e1h_mc_list(bp); | ||
1460 | |||
1461 | /* Clear UC lists configuration */ | ||
1462 | bnx2x_invalidate_uc_list(bp); | ||
1463 | |||
1455 | if (bp->port.pmf) | 1464 | if (bp->port.pmf) |
1456 | bnx2x_initial_phy_init(bp, load_mode); | 1465 | bnx2x_initial_phy_init(bp, load_mode); |
1457 | 1466 | ||
1467 | /* Initialize Rx filtering */ | ||
1468 | bnx2x_set_rx_mode(bp->dev); | ||
1469 | |||
1458 | /* Start fast path */ | 1470 | /* Start fast path */ |
1459 | switch (load_mode) { | 1471 | switch (load_mode) { |
1460 | case LOAD_NORMAL: | 1472 | case LOAD_NORMAL: |
1461 | /* Tx queue should be only reenabled */ | 1473 | /* Tx queue should be only reenabled */ |
1462 | netif_tx_wake_all_queues(bp->dev); | 1474 | netif_tx_wake_all_queues(bp->dev); |
1463 | /* Initialize the receive filter. */ | 1475 | /* Initialize the receive filter. */ |
1464 | bnx2x_set_rx_mode(bp->dev); | ||
1465 | break; | 1476 | break; |
1466 | 1477 | ||
1467 | case LOAD_OPEN: | 1478 | case LOAD_OPEN: |
1468 | netif_tx_start_all_queues(bp->dev); | 1479 | netif_tx_start_all_queues(bp->dev); |
1469 | smp_mb__after_clear_bit(); | 1480 | smp_mb__after_clear_bit(); |
1470 | /* Initialize the receive filter. */ | ||
1471 | bnx2x_set_rx_mode(bp->dev); | ||
1472 | break; | 1481 | break; |
1473 | 1482 | ||
1474 | case LOAD_DIAG: | 1483 | case LOAD_DIAG: |
1475 | /* Initialize the receive filter. */ | ||
1476 | bnx2x_set_rx_mode(bp->dev); | ||
1477 | bp->state = BNX2X_STATE_DIAG; | 1484 | bp->state = BNX2X_STATE_DIAG; |
1478 | break; | 1485 | break; |
1479 | 1486 | ||