diff options
Diffstat (limited to 'drivers/net/ixgbe')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_82599.c | 2 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.c | 16 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_common.h | 5 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 30 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_phy.c | 4 | ||||
-rw-r--r-- | drivers/net/ixgbe/ixgbe_type.h | 3 |
6 files changed, 18 insertions, 42 deletions
diff --git a/drivers/net/ixgbe/ixgbe_82599.c b/drivers/net/ixgbe/ixgbe_82599.c index b405a00817c6..f894bb633040 100644 --- a/drivers/net/ixgbe/ixgbe_82599.c +++ b/drivers/net/ixgbe/ixgbe_82599.c | |||
@@ -1269,7 +1269,7 @@ s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw) | |||
1269 | } | 1269 | } |
1270 | if (i >= IXGBE_FDIRCMD_CMD_POLL) { | 1270 | if (i >= IXGBE_FDIRCMD_CMD_POLL) { |
1271 | hw_dbg(hw ,"Flow Director previous command isn't complete, " | 1271 | hw_dbg(hw ,"Flow Director previous command isn't complete, " |
1272 | "aborting table re-initialization. \n"); | 1272 | "aborting table re-initialization.\n"); |
1273 | return IXGBE_ERR_FDIR_REINIT_FAILED; | 1273 | return IXGBE_ERR_FDIR_REINIT_FAILED; |
1274 | } | 1274 | } |
1275 | 1275 | ||
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c index eb49020903c1..6eb5814ca7da 100644 --- a/drivers/net/ixgbe/ixgbe_common.c +++ b/drivers/net/ixgbe/ixgbe_common.c | |||
@@ -1484,26 +1484,24 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr) | |||
1484 | /** | 1484 | /** |
1485 | * ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses | 1485 | * ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses |
1486 | * @hw: pointer to hardware structure | 1486 | * @hw: pointer to hardware structure |
1487 | * @mc_addr_list: the list of new multicast addresses | 1487 | * @netdev: pointer to net device structure |
1488 | * @mc_addr_count: number of addresses | ||
1489 | * @next: iterator function to walk the multicast address list | ||
1490 | * | 1488 | * |
1491 | * The given list replaces any existing list. Clears the MC addrs from receive | 1489 | * The given list replaces any existing list. Clears the MC addrs from receive |
1492 | * address registers and the multicast table. Uses unused receive address | 1490 | * address registers and the multicast table. Uses unused receive address |
1493 | * registers for the first multicast addresses, and hashes the rest into the | 1491 | * registers for the first multicast addresses, and hashes the rest into the |
1494 | * multicast table. | 1492 | * multicast table. |
1495 | **/ | 1493 | **/ |
1496 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | 1494 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, |
1497 | u32 mc_addr_count, ixgbe_mc_addr_itr next) | 1495 | struct net_device *netdev) |
1498 | { | 1496 | { |
1497 | struct netdev_hw_addr *ha; | ||
1499 | u32 i; | 1498 | u32 i; |
1500 | u32 vmdq; | ||
1501 | 1499 | ||
1502 | /* | 1500 | /* |
1503 | * Set the new number of MC addresses that we are being requested to | 1501 | * Set the new number of MC addresses that we are being requested to |
1504 | * use. | 1502 | * use. |
1505 | */ | 1503 | */ |
1506 | hw->addr_ctrl.num_mc_addrs = mc_addr_count; | 1504 | hw->addr_ctrl.num_mc_addrs = netdev_mc_count(netdev); |
1507 | hw->addr_ctrl.mta_in_use = 0; | 1505 | hw->addr_ctrl.mta_in_use = 0; |
1508 | 1506 | ||
1509 | /* Clear the MTA */ | 1507 | /* Clear the MTA */ |
@@ -1512,9 +1510,9 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | |||
1512 | IXGBE_WRITE_REG(hw, IXGBE_MTA(i), 0); | 1510 | IXGBE_WRITE_REG(hw, IXGBE_MTA(i), 0); |
1513 | 1511 | ||
1514 | /* Add the new addresses */ | 1512 | /* Add the new addresses */ |
1515 | for (i = 0; i < mc_addr_count; i++) { | 1513 | netdev_for_each_mc_addr(ha, netdev) { |
1516 | hw_dbg(hw, " Adding the multicast addresses:\n"); | 1514 | hw_dbg(hw, " Adding the multicast addresses:\n"); |
1517 | ixgbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq)); | 1515 | ixgbe_set_mta(hw, ha->addr); |
1518 | } | 1516 | } |
1519 | 1517 | ||
1520 | /* Enable mta */ | 1518 | /* Enable mta */ |
diff --git a/drivers/net/ixgbe/ixgbe_common.h b/drivers/net/ixgbe/ixgbe_common.h index 13606d4809c9..264eef575cd6 100644 --- a/drivers/net/ixgbe/ixgbe_common.h +++ b/drivers/net/ixgbe/ixgbe_common.h | |||
@@ -56,9 +56,8 @@ s32 ixgbe_set_rar_generic(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq, | |||
56 | u32 enable_addr); | 56 | u32 enable_addr); |
57 | s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index); | 57 | s32 ixgbe_clear_rar_generic(struct ixgbe_hw *hw, u32 index); |
58 | s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw); | 58 | s32 ixgbe_init_rx_addrs_generic(struct ixgbe_hw *hw); |
59 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list, | 59 | s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, |
60 | u32 mc_addr_count, | 60 | struct net_device *netdev); |
61 | ixgbe_mc_addr_itr func); | ||
62 | s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, | 61 | s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, |
63 | struct net_device *netdev); | 62 | struct net_device *netdev); |
64 | s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); | 63 | s32 ixgbe_enable_mc_generic(struct ixgbe_hw *hw); |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 0c553f6cb534..7216db218442 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2537,21 +2537,6 @@ static void ixgbe_restore_vlan(struct ixgbe_adapter *adapter) | |||
2537 | } | 2537 | } |
2538 | } | 2538 | } |
2539 | 2539 | ||
2540 | static u8 *ixgbe_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, u32 *vmdq) | ||
2541 | { | ||
2542 | struct dev_mc_list *mc_ptr; | ||
2543 | u8 *addr = *mc_addr_ptr; | ||
2544 | *vmdq = 0; | ||
2545 | |||
2546 | mc_ptr = container_of(addr, struct dev_mc_list, dmi_addr[0]); | ||
2547 | if (mc_ptr->next) | ||
2548 | *mc_addr_ptr = mc_ptr->next->dmi_addr; | ||
2549 | else | ||
2550 | *mc_addr_ptr = NULL; | ||
2551 | |||
2552 | return addr; | ||
2553 | } | ||
2554 | |||
2555 | /** | 2540 | /** |
2556 | * ixgbe_set_rx_mode - Unicast, Multicast and Promiscuous mode set | 2541 | * ixgbe_set_rx_mode - Unicast, Multicast and Promiscuous mode set |
2557 | * @netdev: network interface device structure | 2542 | * @netdev: network interface device structure |
@@ -2566,8 +2551,6 @@ void ixgbe_set_rx_mode(struct net_device *netdev) | |||
2566 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 2551 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
2567 | struct ixgbe_hw *hw = &adapter->hw; | 2552 | struct ixgbe_hw *hw = &adapter->hw; |
2568 | u32 fctrl, vlnctrl; | 2553 | u32 fctrl, vlnctrl; |
2569 | u8 *addr_list = NULL; | ||
2570 | int addr_count = 0; | ||
2571 | 2554 | ||
2572 | /* Check for Promiscuous and All Multicast modes */ | 2555 | /* Check for Promiscuous and All Multicast modes */ |
2573 | 2556 | ||
@@ -2596,11 +2579,8 @@ void ixgbe_set_rx_mode(struct net_device *netdev) | |||
2596 | hw->mac.ops.update_uc_addr_list(hw, netdev); | 2579 | hw->mac.ops.update_uc_addr_list(hw, netdev); |
2597 | 2580 | ||
2598 | /* reprogram multicast list */ | 2581 | /* reprogram multicast list */ |
2599 | addr_count = netdev_mc_count(netdev); | 2582 | hw->mac.ops.update_mc_addr_list(hw, netdev); |
2600 | if (addr_count) | 2583 | |
2601 | addr_list = netdev->mc_list->dmi_addr; | ||
2602 | hw->mac.ops.update_mc_addr_list(hw, addr_list, addr_count, | ||
2603 | ixgbe_addr_list_itr); | ||
2604 | if (adapter->num_vfs) | 2584 | if (adapter->num_vfs) |
2605 | ixgbe_restore_vf_multicasts(adapter); | 2585 | ixgbe_restore_vf_multicasts(adapter); |
2606 | } | 2586 | } |
@@ -3470,12 +3450,12 @@ static inline bool ixgbe_set_fcoe_queues(struct ixgbe_adapter *adapter) | |||
3470 | adapter->num_tx_queues = 1; | 3450 | adapter->num_tx_queues = 1; |
3471 | #ifdef CONFIG_IXGBE_DCB | 3451 | #ifdef CONFIG_IXGBE_DCB |
3472 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 3452 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { |
3473 | DPRINTK(PROBE, INFO, "FCoE enabled with DCB \n"); | 3453 | DPRINTK(PROBE, INFO, "FCoE enabled with DCB\n"); |
3474 | ixgbe_set_dcb_queues(adapter); | 3454 | ixgbe_set_dcb_queues(adapter); |
3475 | } | 3455 | } |
3476 | #endif | 3456 | #endif |
3477 | if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { | 3457 | if (adapter->flags & IXGBE_FLAG_RSS_ENABLED) { |
3478 | DPRINTK(PROBE, INFO, "FCoE enabled with RSS \n"); | 3458 | DPRINTK(PROBE, INFO, "FCoE enabled with RSS\n"); |
3479 | if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || | 3459 | if ((adapter->flags & IXGBE_FLAG_FDIR_HASH_CAPABLE) || |
3480 | (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) | 3460 | (adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) |
3481 | ixgbe_set_fdir_queues(adapter); | 3461 | ixgbe_set_fdir_queues(adapter); |
@@ -5091,7 +5071,7 @@ static void ixgbe_fdir_reinit_task(struct work_struct *work) | |||
5091 | &(adapter->tx_ring[i]->reinit_state)); | 5071 | &(adapter->tx_ring[i]->reinit_state)); |
5092 | } else { | 5072 | } else { |
5093 | DPRINTK(PROBE, ERR, "failed to finish FDIR re-initialization, " | 5073 | DPRINTK(PROBE, ERR, "failed to finish FDIR re-initialization, " |
5094 | "ignored adding FDIR ATR filters \n"); | 5074 | "ignored adding FDIR ATR filters\n"); |
5095 | } | 5075 | } |
5096 | /* Done FDIR Re-initialization, enable transmits */ | 5076 | /* Done FDIR Re-initialization, enable transmits */ |
5097 | netif_tx_start_all_queues(adapter->netdev); | 5077 | netif_tx_start_all_queues(adapter->netdev); |
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c index 1c1efd386956..d6d5b843d625 100644 --- a/drivers/net/ixgbe/ixgbe_phy.c +++ b/drivers/net/ixgbe/ixgbe_phy.c | |||
@@ -475,7 +475,7 @@ s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw) | |||
475 | msleep(edata); | 475 | msleep(edata); |
476 | break; | 476 | break; |
477 | case IXGBE_DATA_NL: | 477 | case IXGBE_DATA_NL: |
478 | hw_dbg(hw, "DATA: \n"); | 478 | hw_dbg(hw, "DATA:\n"); |
479 | data_offset++; | 479 | data_offset++; |
480 | hw->eeprom.ops.read(hw, data_offset++, | 480 | hw->eeprom.ops.read(hw, data_offset++, |
481 | &phy_offset); | 481 | &phy_offset); |
@@ -491,7 +491,7 @@ s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw) | |||
491 | break; | 491 | break; |
492 | case IXGBE_CONTROL_NL: | 492 | case IXGBE_CONTROL_NL: |
493 | data_offset++; | 493 | data_offset++; |
494 | hw_dbg(hw, "CONTROL: \n"); | 494 | hw_dbg(hw, "CONTROL:\n"); |
495 | if (edata == IXGBE_CONTROL_EOL_NL) { | 495 | if (edata == IXGBE_CONTROL_EOL_NL) { |
496 | hw_dbg(hw, "EOL\n"); | 496 | hw_dbg(hw, "EOL\n"); |
497 | end_data = true; | 497 | end_data = true; |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 4ec6dc1a5b75..aed4ed665648 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -2417,8 +2417,7 @@ struct ixgbe_mac_operations { | |||
2417 | s32 (*clear_vmdq)(struct ixgbe_hw *, u32, u32); | 2417 | s32 (*clear_vmdq)(struct ixgbe_hw *, u32, u32); |
2418 | s32 (*init_rx_addrs)(struct ixgbe_hw *); | 2418 | s32 (*init_rx_addrs)(struct ixgbe_hw *); |
2419 | s32 (*update_uc_addr_list)(struct ixgbe_hw *, struct net_device *); | 2419 | s32 (*update_uc_addr_list)(struct ixgbe_hw *, struct net_device *); |
2420 | s32 (*update_mc_addr_list)(struct ixgbe_hw *, u8 *, u32, | 2420 | s32 (*update_mc_addr_list)(struct ixgbe_hw *, struct net_device *); |
2421 | ixgbe_mc_addr_itr); | ||
2422 | s32 (*enable_mc)(struct ixgbe_hw *); | 2421 | s32 (*enable_mc)(struct ixgbe_hw *); |
2423 | s32 (*disable_mc)(struct ixgbe_hw *); | 2422 | s32 (*disable_mc)(struct ixgbe_hw *); |
2424 | s32 (*clear_vfta)(struct ixgbe_hw *); | 2423 | s32 (*clear_vfta)(struct ixgbe_hw *); |