diff options
Diffstat (limited to 'drivers/net/ixgbevf')
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 32 | ||||
-rw-r--r-- | drivers/net/ixgbevf/vf.c | 24 | ||||
-rw-r--r-- | drivers/net/ixgbevf/vf.h | 4 |
3 files changed, 19 insertions, 41 deletions
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 0cd6202dfacc..d0c3538271e3 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -1496,22 +1496,6 @@ static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) | |||
1496 | } | 1496 | } |
1497 | } | 1497 | } |
1498 | 1498 | ||
1499 | static u8 *ixgbevf_addr_list_itr(struct ixgbe_hw *hw, u8 **mc_addr_ptr, | ||
1500 | u32 *vmdq) | ||
1501 | { | ||
1502 | struct dev_mc_list *mc_ptr; | ||
1503 | u8 *addr = *mc_addr_ptr; | ||
1504 | *vmdq = 0; | ||
1505 | |||
1506 | mc_ptr = container_of(addr, struct dev_mc_list, dmi_addr[0]); | ||
1507 | if (mc_ptr->next) | ||
1508 | *mc_addr_ptr = mc_ptr->next->dmi_addr; | ||
1509 | else | ||
1510 | *mc_addr_ptr = NULL; | ||
1511 | |||
1512 | return addr; | ||
1513 | } | ||
1514 | |||
1515 | /** | 1499 | /** |
1516 | * ixgbevf_set_rx_mode - Multicast set | 1500 | * ixgbevf_set_rx_mode - Multicast set |
1517 | * @netdev: network interface device structure | 1501 | * @netdev: network interface device structure |
@@ -1524,16 +1508,10 @@ static void ixgbevf_set_rx_mode(struct net_device *netdev) | |||
1524 | { | 1508 | { |
1525 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | 1509 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); |
1526 | struct ixgbe_hw *hw = &adapter->hw; | 1510 | struct ixgbe_hw *hw = &adapter->hw; |
1527 | u8 *addr_list = NULL; | ||
1528 | int addr_count = 0; | ||
1529 | 1511 | ||
1530 | /* reprogram multicast list */ | 1512 | /* reprogram multicast list */ |
1531 | addr_count = netdev_mc_count(netdev); | ||
1532 | if (addr_count) | ||
1533 | addr_list = netdev->mc_list->dmi_addr; | ||
1534 | if (hw->mac.ops.update_mc_addr_list) | 1513 | if (hw->mac.ops.update_mc_addr_list) |
1535 | hw->mac.ops.update_mc_addr_list(hw, addr_list, addr_count, | 1514 | hw->mac.ops.update_mc_addr_list(hw, netdev); |
1536 | ixgbevf_addr_list_itr); | ||
1537 | } | 1515 | } |
1538 | 1516 | ||
1539 | static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter) | 1517 | static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter) |
@@ -2418,9 +2396,9 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2418 | 2396 | ||
2419 | if (link_up) { | 2397 | if (link_up) { |
2420 | if (!netif_carrier_ok(netdev)) { | 2398 | if (!netif_carrier_ok(netdev)) { |
2421 | hw_dbg(&adapter->hw, "NIC Link is Up %s, ", | 2399 | hw_dbg(&adapter->hw, "NIC Link is Up, %u Gbps\n", |
2422 | ((link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? | 2400 | (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? |
2423 | "10 Gbps\n" : "1 Gbps\n")); | 2401 | 10 : 1); |
2424 | netif_carrier_on(netdev); | 2402 | netif_carrier_on(netdev); |
2425 | netif_tx_wake_all_queues(netdev); | 2403 | netif_tx_wake_all_queues(netdev); |
2426 | } else { | 2404 | } else { |
@@ -3482,7 +3460,7 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, | |||
3482 | 3460 | ||
3483 | hw_dbg(hw, "MAC: %d\n", hw->mac.type); | 3461 | hw_dbg(hw, "MAC: %d\n", hw->mac.type); |
3484 | 3462 | ||
3485 | hw_dbg(hw, "LRO is disabled \n"); | 3463 | hw_dbg(hw, "LRO is disabled\n"); |
3486 | 3464 | ||
3487 | hw_dbg(hw, "Intel(R) 82599 Virtual Function\n"); | 3465 | hw_dbg(hw, "Intel(R) 82599 Virtual Function\n"); |
3488 | cards_found++; | 3466 | cards_found++; |
diff --git a/drivers/net/ixgbevf/vf.c b/drivers/net/ixgbevf/vf.c index 4b5dec0ec140..852e9c4fd934 100644 --- a/drivers/net/ixgbevf/vf.c +++ b/drivers/net/ixgbevf/vf.c | |||
@@ -252,22 +252,18 @@ static s32 ixgbevf_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, | |||
252 | /** | 252 | /** |
253 | * ixgbevf_update_mc_addr_list_vf - Update Multicast addresses | 253 | * ixgbevf_update_mc_addr_list_vf - Update Multicast addresses |
254 | * @hw: pointer to the HW structure | 254 | * @hw: pointer to the HW structure |
255 | * @mc_addr_list: array of multicast addresses to program | 255 | * @netdev: pointer to net device structure |
256 | * @mc_addr_count: number of multicast addresses to program | ||
257 | * @next: caller supplied function to return next address in list | ||
258 | * | 256 | * |
259 | * Updates the Multicast Table Array. | 257 | * Updates the Multicast Table Array. |
260 | **/ | 258 | **/ |
261 | static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list, | 259 | static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, |
262 | u32 mc_addr_count, | 260 | struct net_device *netdev) |
263 | ixgbe_mc_addr_itr next) | ||
264 | { | 261 | { |
262 | struct netdev_hw_addr *ha; | ||
265 | struct ixgbe_mbx_info *mbx = &hw->mbx; | 263 | struct ixgbe_mbx_info *mbx = &hw->mbx; |
266 | u32 msgbuf[IXGBE_VFMAILBOX_SIZE]; | 264 | u32 msgbuf[IXGBE_VFMAILBOX_SIZE]; |
267 | u16 *vector_list = (u16 *)&msgbuf[1]; | 265 | u16 *vector_list = (u16 *)&msgbuf[1]; |
268 | u32 vector; | ||
269 | u32 cnt, i; | 266 | u32 cnt, i; |
270 | u32 vmdq; | ||
271 | 267 | ||
272 | /* Each entry in the list uses 1 16 bit word. We have 30 | 268 | /* Each entry in the list uses 1 16 bit word. We have 30 |
273 | * 16 bit words available in our HW msg buffer (minus 1 for the | 269 | * 16 bit words available in our HW msg buffer (minus 1 for the |
@@ -278,13 +274,17 @@ static s32 ixgbevf_update_mc_addr_list_vf(struct ixgbe_hw *hw, u8 *mc_addr_list, | |||
278 | * addresses except for in large enterprise network environments. | 274 | * addresses except for in large enterprise network environments. |
279 | */ | 275 | */ |
280 | 276 | ||
281 | cnt = (mc_addr_count > 30) ? 30 : mc_addr_count; | 277 | cnt = netdev_mc_count(netdev); |
278 | if (cnt > 30) | ||
279 | cnt = 30; | ||
282 | msgbuf[0] = IXGBE_VF_SET_MULTICAST; | 280 | msgbuf[0] = IXGBE_VF_SET_MULTICAST; |
283 | msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT; | 281 | msgbuf[0] |= cnt << IXGBE_VT_MSGINFO_SHIFT; |
284 | 282 | ||
285 | for (i = 0; i < cnt; i++) { | 283 | i = 0; |
286 | vector = ixgbevf_mta_vector(hw, next(hw, &mc_addr_list, &vmdq)); | 284 | netdev_for_each_mc_addr(ha, netdev) { |
287 | vector_list[i] = vector; | 285 | if (i == cnt) |
286 | break; | ||
287 | vector_list[i++] = ixgbevf_mta_vector(hw, ha->addr); | ||
288 | } | 288 | } |
289 | 289 | ||
290 | mbx->ops.write_posted(hw, msgbuf, IXGBE_VFMAILBOX_SIZE); | 290 | mbx->ops.write_posted(hw, msgbuf, IXGBE_VFMAILBOX_SIZE); |
diff --git a/drivers/net/ixgbevf/vf.h b/drivers/net/ixgbevf/vf.h index 1f31b052d4b4..94b750b8874f 100644 --- a/drivers/net/ixgbevf/vf.h +++ b/drivers/net/ixgbevf/vf.h | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <linux/delay.h> | 32 | #include <linux/delay.h> |
33 | #include <linux/interrupt.h> | 33 | #include <linux/interrupt.h> |
34 | #include <linux/if_ether.h> | 34 | #include <linux/if_ether.h> |
35 | #include <linux/netdevice.h> | ||
35 | 36 | ||
36 | #include "defines.h" | 37 | #include "defines.h" |
37 | #include "regs.h" | 38 | #include "regs.h" |
@@ -62,8 +63,7 @@ struct ixgbe_mac_operations { | |||
62 | /* RAR, Multicast, VLAN */ | 63 | /* RAR, Multicast, VLAN */ |
63 | s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32); | 64 | s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32); |
64 | s32 (*init_rx_addrs)(struct ixgbe_hw *); | 65 | s32 (*init_rx_addrs)(struct ixgbe_hw *); |
65 | s32 (*update_mc_addr_list)(struct ixgbe_hw *, u8 *, u32, | 66 | s32 (*update_mc_addr_list)(struct ixgbe_hw *, struct net_device *); |
66 | ixgbe_mc_addr_itr); | ||
67 | s32 (*enable_mc)(struct ixgbe_hw *); | 67 | s32 (*enable_mc)(struct ixgbe_hw *); |
68 | s32 (*disable_mc)(struct ixgbe_hw *); | 68 | s32 (*disable_mc)(struct ixgbe_hw *); |
69 | s32 (*clear_vfta)(struct ixgbe_hw *); | 69 | s32 (*clear_vfta)(struct ixgbe_hw *); |