diff options
Diffstat (limited to 'drivers/net/ixgbevf')
-rw-r--r-- | drivers/net/ixgbevf/Makefile | 2 | ||||
-rw-r--r-- | drivers/net/ixgbevf/defines.h | 5 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ethtool.c | 183 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf.h | 8 | ||||
-rw-r--r-- | drivers/net/ixgbevf/ixgbevf_main.c | 190 | ||||
-rw-r--r-- | drivers/net/ixgbevf/mbx.c | 4 | ||||
-rw-r--r-- | drivers/net/ixgbevf/mbx.h | 5 | ||||
-rw-r--r-- | drivers/net/ixgbevf/regs.h | 4 | ||||
-rw-r--r-- | drivers/net/ixgbevf/vf.c | 44 | ||||
-rw-r--r-- | drivers/net/ixgbevf/vf.h | 6 |
10 files changed, 238 insertions, 213 deletions
diff --git a/drivers/net/ixgbevf/Makefile b/drivers/net/ixgbevf/Makefile index dd4e0d27e8cc..1f35d229e71a 100644 --- a/drivers/net/ixgbevf/Makefile +++ b/drivers/net/ixgbevf/Makefile | |||
@@ -1,7 +1,7 @@ | |||
1 | ################################################################################ | 1 | ################################################################################ |
2 | # | 2 | # |
3 | # Intel 82599 Virtual Function driver | 3 | # Intel 82599 Virtual Function driver |
4 | # Copyright(c) 1999 - 2009 Intel Corporation. | 4 | # Copyright(c) 1999 - 2010 Intel Corporation. |
5 | # | 5 | # |
6 | # This program is free software; you can redistribute it and/or modify it | 6 | # This program is free software; you can redistribute it and/or modify it |
7 | # under the terms and conditions of the GNU General Public License, | 7 | # under the terms and conditions of the GNU General Public License, |
diff --git a/drivers/net/ixgbevf/defines.h b/drivers/net/ixgbevf/defines.h index ca2c81f49a05..78abb6f1a866 100644 --- a/drivers/net/ixgbevf/defines.h +++ b/drivers/net/ixgbevf/defines.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -30,6 +30,7 @@ | |||
30 | 30 | ||
31 | /* Device IDs */ | 31 | /* Device IDs */ |
32 | #define IXGBE_DEV_ID_82599_VF 0x10ED | 32 | #define IXGBE_DEV_ID_82599_VF 0x10ED |
33 | #define IXGBE_DEV_ID_X540_VF 0x1515 | ||
33 | 34 | ||
34 | #define IXGBE_VF_IRQ_CLEAR_MASK 7 | 35 | #define IXGBE_VF_IRQ_CLEAR_MASK 7 |
35 | #define IXGBE_VF_MAX_TX_QUEUES 1 | 36 | #define IXGBE_VF_MAX_TX_QUEUES 1 |
@@ -64,6 +65,8 @@ typedef u32 ixgbe_link_speed; | |||
64 | #define IXGBE_RXCTRL_DMBYPS 0x00000002 /* Descriptor Monitor Bypass */ | 65 | #define IXGBE_RXCTRL_DMBYPS 0x00000002 /* Descriptor Monitor Bypass */ |
65 | #define IXGBE_RXDCTL_ENABLE 0x02000000 /* Enable specific Rx Queue */ | 66 | #define IXGBE_RXDCTL_ENABLE 0x02000000 /* Enable specific Rx Queue */ |
66 | #define IXGBE_RXDCTL_VME 0x40000000 /* VLAN mode enable */ | 67 | #define IXGBE_RXDCTL_VME 0x40000000 /* VLAN mode enable */ |
68 | #define IXGBE_RXDCTL_RLPMLMASK 0x00003FFF /* Only supported on the X540 */ | ||
69 | #define IXGBE_RXDCTL_RLPML_EN 0x00008000 | ||
67 | 70 | ||
68 | /* DCA Control */ | 71 | /* DCA Control */ |
69 | #define IXGBE_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */ | 72 | #define IXGBE_DCA_TXCTRL_TX_WB_RO_EN (1 << 11) /* Tx Desc writeback RO bit */ |
diff --git a/drivers/net/ixgbevf/ethtool.c b/drivers/net/ixgbevf/ethtool.c index 4680b069b84f..deee3754b1f7 100644 --- a/drivers/net/ixgbevf/ethtool.c +++ b/drivers/net/ixgbevf/ethtool.c | |||
@@ -104,11 +104,13 @@ static int ixgbevf_get_settings(struct net_device *netdev, | |||
104 | hw->mac.ops.check_link(hw, &link_speed, &link_up, false); | 104 | hw->mac.ops.check_link(hw, &link_speed, &link_up, false); |
105 | 105 | ||
106 | if (link_up) { | 106 | if (link_up) { |
107 | ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? | 107 | ethtool_cmd_speed_set( |
108 | SPEED_10000 : SPEED_1000; | 108 | ecmd, |
109 | (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? | ||
110 | SPEED_10000 : SPEED_1000); | ||
109 | ecmd->duplex = DUPLEX_FULL; | 111 | ecmd->duplex = DUPLEX_FULL; |
110 | } else { | 112 | } else { |
111 | ecmd->speed = -1; | 113 | ethtool_cmd_speed_set(ecmd, -1); |
112 | ecmd->duplex = -1; | 114 | ecmd->duplex = -1; |
113 | } | 115 | } |
114 | 116 | ||
@@ -172,7 +174,7 @@ static char *ixgbevf_reg_names[] = { | |||
172 | "IXGBE_VFSTATUS", | 174 | "IXGBE_VFSTATUS", |
173 | "IXGBE_VFLINKS", | 175 | "IXGBE_VFLINKS", |
174 | "IXGBE_VFRXMEMWRAP", | 176 | "IXGBE_VFRXMEMWRAP", |
175 | "IXGBE_VFRTIMER", | 177 | "IXGBE_VFFRTIMER", |
176 | "IXGBE_VTEICR", | 178 | "IXGBE_VTEICR", |
177 | "IXGBE_VTEICS", | 179 | "IXGBE_VTEICS", |
178 | "IXGBE_VTEIMS", | 180 | "IXGBE_VTEIMS", |
@@ -240,7 +242,7 @@ static void ixgbevf_get_regs(struct net_device *netdev, | |||
240 | regs_buff[1] = IXGBE_READ_REG(hw, IXGBE_VFSTATUS); | 242 | regs_buff[1] = IXGBE_READ_REG(hw, IXGBE_VFSTATUS); |
241 | regs_buff[2] = IXGBE_READ_REG(hw, IXGBE_VFLINKS); | 243 | regs_buff[2] = IXGBE_READ_REG(hw, IXGBE_VFLINKS); |
242 | regs_buff[3] = IXGBE_READ_REG(hw, IXGBE_VFRXMEMWRAP); | 244 | regs_buff[3] = IXGBE_READ_REG(hw, IXGBE_VFRXMEMWRAP); |
243 | regs_buff[4] = IXGBE_READ_REG(hw, IXGBE_VFRTIMER); | 245 | regs_buff[4] = IXGBE_READ_REG(hw, IXGBE_VFFRTIMER); |
244 | 246 | ||
245 | /* Interrupt */ | 247 | /* Interrupt */ |
246 | /* don't read EICR because it can clear interrupt causes, instead | 248 | /* don't read EICR because it can clear interrupt causes, instead |
@@ -330,10 +332,8 @@ static int ixgbevf_set_ringparam(struct net_device *netdev, | |||
330 | { | 332 | { |
331 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | 333 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); |
332 | struct ixgbevf_ring *tx_ring = NULL, *rx_ring = NULL; | 334 | struct ixgbevf_ring *tx_ring = NULL, *rx_ring = NULL; |
333 | int i, err; | 335 | int i, err = 0; |
334 | u32 new_rx_count, new_tx_count; | 336 | u32 new_rx_count, new_tx_count; |
335 | bool need_tx_update = false; | ||
336 | bool need_rx_update = false; | ||
337 | 337 | ||
338 | if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) | 338 | if ((ring->rx_mini_pending) || (ring->rx_jumbo_pending)) |
339 | return -EINVAL; | 339 | return -EINVAL; |
@@ -355,89 +355,96 @@ static int ixgbevf_set_ringparam(struct net_device *netdev, | |||
355 | while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state)) | 355 | while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state)) |
356 | msleep(1); | 356 | msleep(1); |
357 | 357 | ||
358 | if (new_tx_count != adapter->tx_ring_count) { | 358 | /* |
359 | tx_ring = kcalloc(adapter->num_tx_queues, | 359 | * If the adapter isn't up and running then just set the |
360 | sizeof(struct ixgbevf_ring), GFP_KERNEL); | 360 | * new parameters and scurry for the exits. |
361 | if (!tx_ring) { | 361 | */ |
362 | err = -ENOMEM; | 362 | if (!netif_running(adapter->netdev)) { |
363 | goto err_setup; | 363 | for (i = 0; i < adapter->num_tx_queues; i++) |
364 | } | 364 | adapter->tx_ring[i].count = new_tx_count; |
365 | memcpy(tx_ring, adapter->tx_ring, | 365 | for (i = 0; i < adapter->num_rx_queues; i++) |
366 | adapter->num_tx_queues * sizeof(struct ixgbevf_ring)); | 366 | adapter->rx_ring[i].count = new_rx_count; |
367 | for (i = 0; i < adapter->num_tx_queues; i++) { | 367 | adapter->tx_ring_count = new_tx_count; |
368 | tx_ring[i].count = new_tx_count; | 368 | adapter->rx_ring_count = new_rx_count; |
369 | err = ixgbevf_setup_tx_resources(adapter, | 369 | goto clear_reset; |
370 | &tx_ring[i]); | ||
371 | if (err) { | ||
372 | while (i) { | ||
373 | i--; | ||
374 | ixgbevf_free_tx_resources(adapter, | ||
375 | &tx_ring[i]); | ||
376 | } | ||
377 | kfree(tx_ring); | ||
378 | goto err_setup; | ||
379 | } | ||
380 | tx_ring[i].v_idx = adapter->tx_ring[i].v_idx; | ||
381 | } | ||
382 | need_tx_update = true; | ||
383 | } | 370 | } |
384 | 371 | ||
385 | if (new_rx_count != adapter->rx_ring_count) { | 372 | tx_ring = kcalloc(adapter->num_tx_queues, |
386 | rx_ring = kcalloc(adapter->num_rx_queues, | 373 | sizeof(struct ixgbevf_ring), GFP_KERNEL); |
387 | sizeof(struct ixgbevf_ring), GFP_KERNEL); | 374 | if (!tx_ring) { |
388 | if ((!rx_ring) && (need_tx_update)) { | 375 | err = -ENOMEM; |
389 | err = -ENOMEM; | 376 | goto clear_reset; |
390 | goto err_rx_setup; | ||
391 | } | ||
392 | memcpy(rx_ring, adapter->rx_ring, | ||
393 | adapter->num_rx_queues * sizeof(struct ixgbevf_ring)); | ||
394 | for (i = 0; i < adapter->num_rx_queues; i++) { | ||
395 | rx_ring[i].count = new_rx_count; | ||
396 | err = ixgbevf_setup_rx_resources(adapter, | ||
397 | &rx_ring[i]); | ||
398 | if (err) { | ||
399 | while (i) { | ||
400 | i--; | ||
401 | ixgbevf_free_rx_resources(adapter, | ||
402 | &rx_ring[i]); | ||
403 | } | ||
404 | kfree(rx_ring); | ||
405 | goto err_rx_setup; | ||
406 | } | ||
407 | rx_ring[i].v_idx = adapter->rx_ring[i].v_idx; | ||
408 | } | ||
409 | need_rx_update = true; | ||
410 | } | 377 | } |
411 | 378 | ||
412 | err_rx_setup: | 379 | rx_ring = kcalloc(adapter->num_rx_queues, |
413 | /* if rings need to be updated, here's the place to do it in one shot */ | 380 | sizeof(struct ixgbevf_ring), GFP_KERNEL); |
414 | if (need_tx_update || need_rx_update) { | 381 | if (!rx_ring) { |
415 | if (netif_running(netdev)) | 382 | err = -ENOMEM; |
416 | ixgbevf_down(adapter); | 383 | goto err_rx_setup; |
417 | } | 384 | } |
418 | 385 | ||
419 | /* tx */ | 386 | ixgbevf_down(adapter); |
420 | if (need_tx_update) { | 387 | |
421 | kfree(adapter->tx_ring); | 388 | memcpy(tx_ring, adapter->tx_ring, |
422 | adapter->tx_ring = tx_ring; | 389 | adapter->num_tx_queues * sizeof(struct ixgbevf_ring)); |
423 | tx_ring = NULL; | 390 | for (i = 0; i < adapter->num_tx_queues; i++) { |
424 | adapter->tx_ring_count = new_tx_count; | 391 | tx_ring[i].count = new_tx_count; |
392 | err = ixgbevf_setup_tx_resources(adapter, &tx_ring[i]); | ||
393 | if (err) { | ||
394 | while (i) { | ||
395 | i--; | ||
396 | ixgbevf_free_tx_resources(adapter, | ||
397 | &tx_ring[i]); | ||
398 | } | ||
399 | goto err_tx_ring_setup; | ||
400 | } | ||
401 | tx_ring[i].v_idx = adapter->tx_ring[i].v_idx; | ||
425 | } | 402 | } |
426 | 403 | ||
427 | /* rx */ | 404 | memcpy(rx_ring, adapter->rx_ring, |
428 | if (need_rx_update) { | 405 | adapter->num_rx_queues * sizeof(struct ixgbevf_ring)); |
429 | kfree(adapter->rx_ring); | 406 | for (i = 0; i < adapter->num_rx_queues; i++) { |
430 | adapter->rx_ring = rx_ring; | 407 | rx_ring[i].count = new_rx_count; |
431 | rx_ring = NULL; | 408 | err = ixgbevf_setup_rx_resources(adapter, &rx_ring[i]); |
432 | adapter->rx_ring_count = new_rx_count; | 409 | if (err) { |
410 | while (i) { | ||
411 | i--; | ||
412 | ixgbevf_free_rx_resources(adapter, | ||
413 | &rx_ring[i]); | ||
414 | } | ||
415 | goto err_rx_ring_setup; | ||
416 | } | ||
417 | rx_ring[i].v_idx = adapter->rx_ring[i].v_idx; | ||
433 | } | 418 | } |
434 | 419 | ||
420 | /* | ||
421 | * Only switch to new rings if all the prior allocations | ||
422 | * and ring setups have succeeded. | ||
423 | */ | ||
424 | kfree(adapter->tx_ring); | ||
425 | adapter->tx_ring = tx_ring; | ||
426 | adapter->tx_ring_count = new_tx_count; | ||
427 | |||
428 | kfree(adapter->rx_ring); | ||
429 | adapter->rx_ring = rx_ring; | ||
430 | adapter->rx_ring_count = new_rx_count; | ||
431 | |||
435 | /* success! */ | 432 | /* success! */ |
436 | err = 0; | 433 | ixgbevf_up(adapter); |
437 | if (netif_running(netdev)) | ||
438 | ixgbevf_up(adapter); | ||
439 | 434 | ||
440 | err_setup: | 435 | goto clear_reset; |
436 | |||
437 | err_rx_ring_setup: | ||
438 | for(i = 0; i < adapter->num_tx_queues; i++) | ||
439 | ixgbevf_free_tx_resources(adapter, &tx_ring[i]); | ||
440 | |||
441 | err_tx_ring_setup: | ||
442 | kfree(rx_ring); | ||
443 | |||
444 | err_rx_setup: | ||
445 | kfree(tx_ring); | ||
446 | |||
447 | clear_reset: | ||
441 | clear_bit(__IXGBEVF_RESETTING, &adapter->state); | 448 | clear_bit(__IXGBEVF_RESETTING, &adapter->state); |
442 | return err; | 449 | return err; |
443 | } | 450 | } |
@@ -539,7 +546,7 @@ struct ixgbevf_reg_test { | |||
539 | #define TABLE64_TEST_HI 6 | 546 | #define TABLE64_TEST_HI 6 |
540 | 547 | ||
541 | /* default VF register test */ | 548 | /* default VF register test */ |
542 | static struct ixgbevf_reg_test reg_test_vf[] = { | 549 | static const struct ixgbevf_reg_test reg_test_vf[] = { |
543 | { IXGBE_VFRDBAL(0), 2, PATTERN_TEST, 0xFFFFFF80, 0xFFFFFF80 }, | 550 | { IXGBE_VFRDBAL(0), 2, PATTERN_TEST, 0xFFFFFF80, 0xFFFFFF80 }, |
544 | { IXGBE_VFRDBAH(0), 2, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF }, | 551 | { IXGBE_VFRDBAH(0), 2, PATTERN_TEST, 0xFFFFFFFF, 0xFFFFFFFF }, |
545 | { IXGBE_VFRDLEN(0), 2, PATTERN_TEST, 0x000FFF80, 0x000FFFFF }, | 552 | { IXGBE_VFRDLEN(0), 2, PATTERN_TEST, 0x000FFF80, 0x000FFFFF }, |
@@ -552,19 +559,23 @@ static struct ixgbevf_reg_test reg_test_vf[] = { | |||
552 | { 0, 0, 0, 0 } | 559 | { 0, 0, 0, 0 } |
553 | }; | 560 | }; |
554 | 561 | ||
562 | static const u32 register_test_patterns[] = { | ||
563 | 0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF | ||
564 | }; | ||
565 | |||
555 | #define REG_PATTERN_TEST(R, M, W) \ | 566 | #define REG_PATTERN_TEST(R, M, W) \ |
556 | { \ | 567 | { \ |
557 | u32 pat, val, before; \ | 568 | u32 pat, val, before; \ |
558 | const u32 _test[] = {0x5A5A5A5A, 0xA5A5A5A5, 0x00000000, 0xFFFFFFFF}; \ | 569 | for (pat = 0; pat < ARRAY_SIZE(register_test_patterns); pat++) { \ |
559 | for (pat = 0; pat < ARRAY_SIZE(_test); pat++) { \ | ||
560 | before = readl(adapter->hw.hw_addr + R); \ | 570 | before = readl(adapter->hw.hw_addr + R); \ |
561 | writel((_test[pat] & W), (adapter->hw.hw_addr + R)); \ | 571 | writel((register_test_patterns[pat] & W), \ |
572 | (adapter->hw.hw_addr + R)); \ | ||
562 | val = readl(adapter->hw.hw_addr + R); \ | 573 | val = readl(adapter->hw.hw_addr + R); \ |
563 | if (val != (_test[pat] & W & M)) { \ | 574 | if (val != (register_test_patterns[pat] & W & M)) { \ |
564 | hw_dbg(&adapter->hw, \ | 575 | hw_dbg(&adapter->hw, \ |
565 | "pattern test reg %04X failed: got " \ | 576 | "pattern test reg %04X failed: got " \ |
566 | "0x%08X expected 0x%08X\n", \ | 577 | "0x%08X expected 0x%08X\n", \ |
567 | R, val, (_test[pat] & W & M)); \ | 578 | R, val, (register_test_patterns[pat] & W & M)); \ |
568 | *data = R; \ | 579 | *data = R; \ |
569 | writel(before, adapter->hw.hw_addr + R); \ | 580 | writel(before, adapter->hw.hw_addr + R); \ |
570 | return 1; \ | 581 | return 1; \ |
@@ -591,7 +602,7 @@ static struct ixgbevf_reg_test reg_test_vf[] = { | |||
591 | 602 | ||
592 | static int ixgbevf_reg_test(struct ixgbevf_adapter *adapter, u64 *data) | 603 | static int ixgbevf_reg_test(struct ixgbevf_adapter *adapter, u64 *data) |
593 | { | 604 | { |
594 | struct ixgbevf_reg_test *test; | 605 | const struct ixgbevf_reg_test *test; |
595 | u32 i; | 606 | u32 i; |
596 | 607 | ||
597 | test = reg_test_vf; | 608 | test = reg_test_vf; |
diff --git a/drivers/net/ixgbevf/ixgbevf.h b/drivers/net/ixgbevf/ixgbevf.h index f7015efbff05..b703f60be3b7 100644 --- a/drivers/net/ixgbevf/ixgbevf.h +++ b/drivers/net/ixgbevf/ixgbevf.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -207,7 +207,6 @@ struct ixgbevf_adapter { | |||
207 | u64 hw_tso_ctxt; | 207 | u64 hw_tso_ctxt; |
208 | u64 hw_tso6_ctxt; | 208 | u64 hw_tso6_ctxt; |
209 | u32 tx_timeout_count; | 209 | u32 tx_timeout_count; |
210 | bool detect_tx_hung; | ||
211 | 210 | ||
212 | /* RX */ | 211 | /* RX */ |
213 | struct ixgbevf_ring *rx_ring; /* One per active queue */ | 212 | struct ixgbevf_ring *rx_ring; /* One per active queue */ |
@@ -243,7 +242,6 @@ struct ixgbevf_adapter { | |||
243 | /* OS defined structs */ | 242 | /* OS defined structs */ |
244 | struct net_device *netdev; | 243 | struct net_device *netdev; |
245 | struct pci_dev *pdev; | 244 | struct pci_dev *pdev; |
246 | struct net_device_stats net_stats; | ||
247 | 245 | ||
248 | /* structs defined in ixgbe_vf.h */ | 246 | /* structs defined in ixgbe_vf.h */ |
249 | struct ixgbe_hw hw; | 247 | struct ixgbe_hw hw; |
@@ -276,9 +274,11 @@ enum ixbgevf_state_t { | |||
276 | 274 | ||
277 | enum ixgbevf_boards { | 275 | enum ixgbevf_boards { |
278 | board_82599_vf, | 276 | board_82599_vf, |
277 | board_X540_vf, | ||
279 | }; | 278 | }; |
280 | 279 | ||
281 | extern struct ixgbevf_info ixgbevf_vf_info; | 280 | extern struct ixgbevf_info ixgbevf_82599_vf_info; |
281 | extern struct ixgbevf_info ixgbevf_X540_vf_info; | ||
282 | extern struct ixgbe_mac_operations ixgbevf_mbx_ops; | 282 | extern struct ixgbe_mac_operations ixgbevf_mbx_ops; |
283 | 283 | ||
284 | /* needed by ethtool.c */ | 284 | /* needed by ethtool.c */ |
diff --git a/drivers/net/ixgbevf/ixgbevf_main.c b/drivers/net/ixgbevf/ixgbevf_main.c index 918c00359b0a..28d3cb21d376 100644 --- a/drivers/net/ixgbevf/ixgbevf_main.c +++ b/drivers/net/ixgbevf/ixgbevf_main.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -44,19 +44,22 @@ | |||
44 | #include <net/ip6_checksum.h> | 44 | #include <net/ip6_checksum.h> |
45 | #include <linux/ethtool.h> | 45 | #include <linux/ethtool.h> |
46 | #include <linux/if_vlan.h> | 46 | #include <linux/if_vlan.h> |
47 | #include <linux/prefetch.h> | ||
47 | 48 | ||
48 | #include "ixgbevf.h" | 49 | #include "ixgbevf.h" |
49 | 50 | ||
50 | char ixgbevf_driver_name[] = "ixgbevf"; | 51 | char ixgbevf_driver_name[] = "ixgbevf"; |
51 | static const char ixgbevf_driver_string[] = | 52 | static const char ixgbevf_driver_string[] = |
52 | "Intel(R) 82599 Virtual Function"; | 53 | "Intel(R) 10 Gigabit PCI Express Virtual Function Network Driver"; |
53 | 54 | ||
54 | #define DRV_VERSION "1.0.0-k0" | 55 | #define DRV_VERSION "2.0.0-k2" |
55 | const char ixgbevf_driver_version[] = DRV_VERSION; | 56 | const char ixgbevf_driver_version[] = DRV_VERSION; |
56 | static char ixgbevf_copyright[] = "Copyright (c) 2009 Intel Corporation."; | 57 | static char ixgbevf_copyright[] = |
58 | "Copyright (c) 2009 - 2010 Intel Corporation."; | ||
57 | 59 | ||
58 | static const struct ixgbevf_info *ixgbevf_info_tbl[] = { | 60 | static const struct ixgbevf_info *ixgbevf_info_tbl[] = { |
59 | [board_82599_vf] = &ixgbevf_vf_info, | 61 | [board_82599_vf] = &ixgbevf_82599_vf_info, |
62 | [board_X540_vf] = &ixgbevf_X540_vf_info, | ||
60 | }; | 63 | }; |
61 | 64 | ||
62 | /* ixgbevf_pci_tbl - PCI Device ID Table | 65 | /* ixgbevf_pci_tbl - PCI Device ID Table |
@@ -70,6 +73,8 @@ static const struct ixgbevf_info *ixgbevf_info_tbl[] = { | |||
70 | static struct pci_device_id ixgbevf_pci_tbl[] = { | 73 | static struct pci_device_id ixgbevf_pci_tbl[] = { |
71 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), | 74 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_VF), |
72 | board_82599_vf}, | 75 | board_82599_vf}, |
76 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_X540_VF), | ||
77 | board_X540_vf}, | ||
73 | 78 | ||
74 | /* required last entry */ | 79 | /* required last entry */ |
75 | {0, } | 80 | {0, } |
@@ -103,7 +108,7 @@ static inline void ixgbevf_release_rx_desc(struct ixgbe_hw *hw, | |||
103 | } | 108 | } |
104 | 109 | ||
105 | /* | 110 | /* |
106 | * ixgbe_set_ivar - set the IVAR registers, mapping interrupt causes to vectors | 111 | * ixgbevf_set_ivar - set IVAR registers - maps interrupt causes to vectors |
107 | * @adapter: pointer to adapter struct | 112 | * @adapter: pointer to adapter struct |
108 | * @direction: 0 for Rx, 1 for Tx, -1 for other causes | 113 | * @direction: 0 for Rx, 1 for Tx, -1 for other causes |
109 | * @queue: queue to map the corresponding interrupt to | 114 | * @queue: queue to map the corresponding interrupt to |
@@ -158,42 +163,6 @@ static void ixgbevf_unmap_and_free_tx_resource(struct ixgbevf_adapter *adapter, | |||
158 | /* tx_buffer_info must be completely set up in the transmit path */ | 163 | /* tx_buffer_info must be completely set up in the transmit path */ |
159 | } | 164 | } |
160 | 165 | ||
161 | static inline bool ixgbevf_check_tx_hang(struct ixgbevf_adapter *adapter, | ||
162 | struct ixgbevf_ring *tx_ring, | ||
163 | unsigned int eop) | ||
164 | { | ||
165 | struct ixgbe_hw *hw = &adapter->hw; | ||
166 | u32 head, tail; | ||
167 | |||
168 | /* Detect a transmit hang in hardware, this serializes the | ||
169 | * check with the clearing of time_stamp and movement of eop */ | ||
170 | head = readl(hw->hw_addr + tx_ring->head); | ||
171 | tail = readl(hw->hw_addr + tx_ring->tail); | ||
172 | adapter->detect_tx_hung = false; | ||
173 | if ((head != tail) && | ||
174 | tx_ring->tx_buffer_info[eop].time_stamp && | ||
175 | time_after(jiffies, tx_ring->tx_buffer_info[eop].time_stamp + HZ)) { | ||
176 | /* detected Tx unit hang */ | ||
177 | union ixgbe_adv_tx_desc *tx_desc; | ||
178 | tx_desc = IXGBE_TX_DESC_ADV(*tx_ring, eop); | ||
179 | printk(KERN_ERR "Detected Tx Unit Hang\n" | ||
180 | " Tx Queue <%d>\n" | ||
181 | " TDH, TDT <%x>, <%x>\n" | ||
182 | " next_to_use <%x>\n" | ||
183 | " next_to_clean <%x>\n" | ||
184 | "tx_buffer_info[next_to_clean]\n" | ||
185 | " time_stamp <%lx>\n" | ||
186 | " jiffies <%lx>\n", | ||
187 | tx_ring->queue_index, | ||
188 | head, tail, | ||
189 | tx_ring->next_to_use, eop, | ||
190 | tx_ring->tx_buffer_info[eop].time_stamp, jiffies); | ||
191 | return true; | ||
192 | } | ||
193 | |||
194 | return false; | ||
195 | } | ||
196 | |||
197 | #define IXGBE_MAX_TXD_PWR 14 | 166 | #define IXGBE_MAX_TXD_PWR 14 |
198 | #define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR) | 167 | #define IXGBE_MAX_DATA_PER_TXD (1 << IXGBE_MAX_TXD_PWR) |
199 | 168 | ||
@@ -289,16 +258,6 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, | |||
289 | #endif | 258 | #endif |
290 | } | 259 | } |
291 | 260 | ||
292 | if (adapter->detect_tx_hung) { | ||
293 | if (ixgbevf_check_tx_hang(adapter, tx_ring, i)) { | ||
294 | /* schedule immediate reset if we believe we hung */ | ||
295 | printk(KERN_INFO | ||
296 | "tx hang %d detected, resetting adapter\n", | ||
297 | adapter->tx_timeout_count + 1); | ||
298 | ixgbevf_tx_timeout(adapter->netdev); | ||
299 | } | ||
300 | } | ||
301 | |||
302 | /* re-arm the interrupt */ | 261 | /* re-arm the interrupt */ |
303 | if ((count >= tx_ring->work_limit) && | 262 | if ((count >= tx_ring->work_limit) && |
304 | (!test_bit(__IXGBEVF_DOWN, &adapter->state))) { | 263 | (!test_bit(__IXGBEVF_DOWN, &adapter->state))) { |
@@ -308,10 +267,10 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter, | |||
308 | tx_ring->total_bytes += total_bytes; | 267 | tx_ring->total_bytes += total_bytes; |
309 | tx_ring->total_packets += total_packets; | 268 | tx_ring->total_packets += total_packets; |
310 | 269 | ||
311 | adapter->net_stats.tx_bytes += total_bytes; | 270 | netdev->stats.tx_bytes += total_bytes; |
312 | adapter->net_stats.tx_packets += total_packets; | 271 | netdev->stats.tx_packets += total_packets; |
313 | 272 | ||
314 | return (count < tx_ring->work_limit); | 273 | return count < tx_ring->work_limit; |
315 | } | 274 | } |
316 | 275 | ||
317 | /** | 276 | /** |
@@ -330,7 +289,6 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector, | |||
330 | struct ixgbevf_adapter *adapter = q_vector->adapter; | 289 | struct ixgbevf_adapter *adapter = q_vector->adapter; |
331 | bool is_vlan = (status & IXGBE_RXD_STAT_VP); | 290 | bool is_vlan = (status & IXGBE_RXD_STAT_VP); |
332 | u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan); | 291 | u16 tag = le16_to_cpu(rx_desc->wb.upper.vlan); |
333 | int ret; | ||
334 | 292 | ||
335 | if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) { | 293 | if (!(adapter->flags & IXGBE_FLAG_IN_NETPOLL)) { |
336 | if (adapter->vlgrp && is_vlan) | 294 | if (adapter->vlgrp && is_vlan) |
@@ -341,9 +299,9 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector, | |||
341 | napi_gro_receive(&q_vector->napi, skb); | 299 | napi_gro_receive(&q_vector->napi, skb); |
342 | } else { | 300 | } else { |
343 | if (adapter->vlgrp && is_vlan) | 301 | if (adapter->vlgrp && is_vlan) |
344 | ret = vlan_hwaccel_rx(skb, adapter->vlgrp, tag); | 302 | vlan_hwaccel_rx(skb, adapter->vlgrp, tag); |
345 | else | 303 | else |
346 | ret = netif_rx(skb); | 304 | netif_rx(skb); |
347 | } | 305 | } |
348 | } | 306 | } |
349 | 307 | ||
@@ -356,7 +314,7 @@ static void ixgbevf_receive_skb(struct ixgbevf_q_vector *q_vector, | |||
356 | static inline void ixgbevf_rx_checksum(struct ixgbevf_adapter *adapter, | 314 | static inline void ixgbevf_rx_checksum(struct ixgbevf_adapter *adapter, |
357 | u32 status_err, struct sk_buff *skb) | 315 | u32 status_err, struct sk_buff *skb) |
358 | { | 316 | { |
359 | skb->ip_summed = CHECKSUM_NONE; | 317 | skb_checksum_none_assert(skb); |
360 | 318 | ||
361 | /* Rx csum disabled */ | 319 | /* Rx csum disabled */ |
362 | if (!(adapter->flags & IXGBE_FLAG_RX_CSUM_ENABLED)) | 320 | if (!(adapter->flags & IXGBE_FLAG_RX_CSUM_ENABLED)) |
@@ -639,8 +597,8 @@ next_desc: | |||
639 | 597 | ||
640 | rx_ring->total_packets += total_rx_packets; | 598 | rx_ring->total_packets += total_rx_packets; |
641 | rx_ring->total_bytes += total_rx_bytes; | 599 | rx_ring->total_bytes += total_rx_bytes; |
642 | adapter->net_stats.rx_bytes += total_rx_bytes; | 600 | adapter->netdev->stats.rx_bytes += total_rx_bytes; |
643 | adapter->net_stats.rx_packets += total_rx_packets; | 601 | adapter->netdev->stats.rx_packets += total_rx_packets; |
644 | 602 | ||
645 | return cleaned; | 603 | return cleaned; |
646 | } | 604 | } |
@@ -1013,7 +971,7 @@ static irqreturn_t ixgbevf_msix_clean_tx(int irq, void *data) | |||
1013 | } | 971 | } |
1014 | 972 | ||
1015 | /** | 973 | /** |
1016 | * ixgbe_msix_clean_rx - single unshared vector rx clean (all queues) | 974 | * ixgbevf_msix_clean_rx - single unshared vector rx clean (all queues) |
1017 | * @irq: unused | 975 | * @irq: unused |
1018 | * @data: pointer to our q_vector struct for this interrupt vector | 976 | * @data: pointer to our q_vector struct for this interrupt vector |
1019 | **/ | 977 | **/ |
@@ -1495,7 +1453,7 @@ static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) | |||
1495 | 1453 | ||
1496 | if (adapter->vlgrp) { | 1454 | if (adapter->vlgrp) { |
1497 | u16 vid; | 1455 | u16 vid; |
1498 | for (vid = 0; vid < VLAN_GROUP_ARRAY_LEN; vid++) { | 1456 | for (vid = 0; vid < VLAN_N_VID; vid++) { |
1499 | if (!vlan_group_get_device(adapter->vlgrp, vid)) | 1457 | if (!vlan_group_get_device(adapter->vlgrp, vid)) |
1500 | continue; | 1458 | continue; |
1501 | ixgbevf_vlan_rx_add_vid(adapter->netdev, vid); | 1459 | ixgbevf_vlan_rx_add_vid(adapter->netdev, vid); |
@@ -1503,6 +1461,34 @@ static void ixgbevf_restore_vlan(struct ixgbevf_adapter *adapter) | |||
1503 | } | 1461 | } |
1504 | } | 1462 | } |
1505 | 1463 | ||
1464 | static int ixgbevf_write_uc_addr_list(struct net_device *netdev) | ||
1465 | { | ||
1466 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | ||
1467 | struct ixgbe_hw *hw = &adapter->hw; | ||
1468 | int count = 0; | ||
1469 | |||
1470 | if ((netdev_uc_count(netdev)) > 10) { | ||
1471 | printk(KERN_ERR "Too many unicast filters - No Space\n"); | ||
1472 | return -ENOSPC; | ||
1473 | } | ||
1474 | |||
1475 | if (!netdev_uc_empty(netdev)) { | ||
1476 | struct netdev_hw_addr *ha; | ||
1477 | netdev_for_each_uc_addr(ha, netdev) { | ||
1478 | hw->mac.ops.set_uc_addr(hw, ++count, ha->addr); | ||
1479 | udelay(200); | ||
1480 | } | ||
1481 | } else { | ||
1482 | /* | ||
1483 | * If the list is empty then send message to PF driver to | ||
1484 | * clear all macvlans on this VF. | ||
1485 | */ | ||
1486 | hw->mac.ops.set_uc_addr(hw, 0, NULL); | ||
1487 | } | ||
1488 | |||
1489 | return count; | ||
1490 | } | ||
1491 | |||
1506 | /** | 1492 | /** |
1507 | * ixgbevf_set_rx_mode - Multicast set | 1493 | * ixgbevf_set_rx_mode - Multicast set |
1508 | * @netdev: network interface device structure | 1494 | * @netdev: network interface device structure |
@@ -1519,6 +1505,8 @@ static void ixgbevf_set_rx_mode(struct net_device *netdev) | |||
1519 | /* reprogram multicast list */ | 1505 | /* reprogram multicast list */ |
1520 | if (hw->mac.ops.update_mc_addr_list) | 1506 | if (hw->mac.ops.update_mc_addr_list) |
1521 | hw->mac.ops.update_mc_addr_list(hw, netdev); | 1507 | hw->mac.ops.update_mc_addr_list(hw, netdev); |
1508 | |||
1509 | ixgbevf_write_uc_addr_list(netdev); | ||
1522 | } | 1510 | } |
1523 | 1511 | ||
1524 | static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter) | 1512 | static void ixgbevf_napi_enable_all(struct ixgbevf_adapter *adapter) |
@@ -1661,6 +1649,11 @@ static int ixgbevf_up_complete(struct ixgbevf_adapter *adapter) | |||
1661 | j = adapter->rx_ring[i].reg_idx; | 1649 | j = adapter->rx_ring[i].reg_idx; |
1662 | rxdctl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(j)); | 1650 | rxdctl = IXGBE_READ_REG(hw, IXGBE_VFRXDCTL(j)); |
1663 | rxdctl |= IXGBE_RXDCTL_ENABLE; | 1651 | rxdctl |= IXGBE_RXDCTL_ENABLE; |
1652 | if (hw->mac.type == ixgbe_mac_X540_vf) { | ||
1653 | rxdctl &= ~IXGBE_RXDCTL_RLPMLMASK; | ||
1654 | rxdctl |= ((netdev->mtu + ETH_HLEN + ETH_FCS_LEN) | | ||
1655 | IXGBE_RXDCTL_RLPML_EN); | ||
1656 | } | ||
1664 | IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(j), rxdctl); | 1657 | IXGBE_WRITE_REG(hw, IXGBE_VFRXDCTL(j), rxdctl); |
1665 | ixgbevf_rx_desc_queue_enable(adapter, i); | 1658 | ixgbevf_rx_desc_queue_enable(adapter, i); |
1666 | } | 1659 | } |
@@ -1963,7 +1956,7 @@ static void ixgbevf_acquire_msix_vectors(struct ixgbevf_adapter *adapter, | |||
1963 | } | 1956 | } |
1964 | 1957 | ||
1965 | /* | 1958 | /* |
1966 | * ixgbe_set_num_queues: Allocate queues for device, feature dependant | 1959 | * ixgbevf_set_num_queues: Allocate queues for device, feature dependent |
1967 | * @adapter: board private structure to initialize | 1960 | * @adapter: board private structure to initialize |
1968 | * | 1961 | * |
1969 | * This is the top level queue allocation routine. The order here is very | 1962 | * This is the top level queue allocation routine. The order here is very |
@@ -2212,7 +2205,7 @@ static int __devinit ixgbevf_sw_init(struct ixgbevf_adapter *adapter) | |||
2212 | 2205 | ||
2213 | hw->vendor_id = pdev->vendor; | 2206 | hw->vendor_id = pdev->vendor; |
2214 | hw->device_id = pdev->device; | 2207 | hw->device_id = pdev->device; |
2215 | pci_read_config_byte(pdev, PCI_REVISION_ID, &hw->revision_id); | 2208 | hw->revision_id = pdev->revision; |
2216 | hw->subsystem_vendor_id = pdev->subsystem_vendor; | 2209 | hw->subsystem_vendor_id = pdev->subsystem_vendor; |
2217 | hw->subsystem_device_id = pdev->subsystem_device; | 2210 | hw->subsystem_device_id = pdev->subsystem_device; |
2218 | 2211 | ||
@@ -2297,7 +2290,7 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter) | |||
2297 | adapter->stats.vfmprc); | 2290 | adapter->stats.vfmprc); |
2298 | 2291 | ||
2299 | /* Fill out the OS statistics structure */ | 2292 | /* Fill out the OS statistics structure */ |
2300 | adapter->net_stats.multicast = adapter->stats.vfmprc - | 2293 | adapter->netdev->stats.multicast = adapter->stats.vfmprc - |
2301 | adapter->stats.base_vfmprc; | 2294 | adapter->stats.base_vfmprc; |
2302 | } | 2295 | } |
2303 | 2296 | ||
@@ -2406,9 +2399,6 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2406 | 10 : 1); | 2399 | 10 : 1); |
2407 | netif_carrier_on(netdev); | 2400 | netif_carrier_on(netdev); |
2408 | netif_tx_wake_all_queues(netdev); | 2401 | netif_tx_wake_all_queues(netdev); |
2409 | } else { | ||
2410 | /* Force detection of hung controller */ | ||
2411 | adapter->detect_tx_hung = true; | ||
2412 | } | 2402 | } |
2413 | } else { | 2403 | } else { |
2414 | adapter->link_up = false; | 2404 | adapter->link_up = false; |
@@ -2423,9 +2413,6 @@ static void ixgbevf_watchdog_task(struct work_struct *work) | |||
2423 | ixgbevf_update_stats(adapter); | 2413 | ixgbevf_update_stats(adapter); |
2424 | 2414 | ||
2425 | pf_has_reset: | 2415 | pf_has_reset: |
2426 | /* Force detection of hung controller every watchdog period */ | ||
2427 | adapter->detect_tx_hung = true; | ||
2428 | |||
2429 | /* Reset the timer */ | 2416 | /* Reset the timer */ |
2430 | if (!test_bit(__IXGBEVF_DOWN, &adapter->state)) | 2417 | if (!test_bit(__IXGBEVF_DOWN, &adapter->state)) |
2431 | mod_timer(&adapter->watchdog_timer, | 2418 | mod_timer(&adapter->watchdog_timer, |
@@ -2488,10 +2475,9 @@ int ixgbevf_setup_tx_resources(struct ixgbevf_adapter *adapter, | |||
2488 | int size; | 2475 | int size; |
2489 | 2476 | ||
2490 | size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count; | 2477 | size = sizeof(struct ixgbevf_tx_buffer) * tx_ring->count; |
2491 | tx_ring->tx_buffer_info = vmalloc(size); | 2478 | tx_ring->tx_buffer_info = vzalloc(size); |
2492 | if (!tx_ring->tx_buffer_info) | 2479 | if (!tx_ring->tx_buffer_info) |
2493 | goto err; | 2480 | goto err; |
2494 | memset(tx_ring->tx_buffer_info, 0, size); | ||
2495 | 2481 | ||
2496 | /* round up to nearest 4K */ | 2482 | /* round up to nearest 4K */ |
2497 | tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); | 2483 | tx_ring->size = tx_ring->count * sizeof(union ixgbe_adv_tx_desc); |
@@ -2555,14 +2541,13 @@ int ixgbevf_setup_rx_resources(struct ixgbevf_adapter *adapter, | |||
2555 | int size; | 2541 | int size; |
2556 | 2542 | ||
2557 | size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count; | 2543 | size = sizeof(struct ixgbevf_rx_buffer) * rx_ring->count; |
2558 | rx_ring->rx_buffer_info = vmalloc(size); | 2544 | rx_ring->rx_buffer_info = vzalloc(size); |
2559 | if (!rx_ring->rx_buffer_info) { | 2545 | if (!rx_ring->rx_buffer_info) { |
2560 | hw_dbg(&adapter->hw, | 2546 | hw_dbg(&adapter->hw, |
2561 | "Unable to vmalloc buffer memory for " | 2547 | "Unable to vmalloc buffer memory for " |
2562 | "the receive descriptor ring\n"); | 2548 | "the receive descriptor ring\n"); |
2563 | goto alloc_failed; | 2549 | goto alloc_failed; |
2564 | } | 2550 | } |
2565 | memset(rx_ring->rx_buffer_info, 0, size); | ||
2566 | 2551 | ||
2567 | /* Round up to nearest 4K */ | 2552 | /* Round up to nearest 4K */ |
2568 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); | 2553 | rx_ring->size = rx_ring->count * sizeof(union ixgbe_adv_rx_desc); |
@@ -3134,7 +3119,7 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3134 | 3119 | ||
3135 | tx_ring = &adapter->tx_ring[r_idx]; | 3120 | tx_ring = &adapter->tx_ring[r_idx]; |
3136 | 3121 | ||
3137 | if (adapter->vlgrp && vlan_tx_tag_present(skb)) { | 3122 | if (vlan_tx_tag_present(skb)) { |
3138 | tx_flags |= vlan_tx_tag_get(skb); | 3123 | tx_flags |= vlan_tx_tag_get(skb); |
3139 | tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; | 3124 | tx_flags <<= IXGBE_TX_FLAGS_VLAN_SHIFT; |
3140 | tx_flags |= IXGBE_TX_FLAGS_VLAN; | 3125 | tx_flags |= IXGBE_TX_FLAGS_VLAN; |
@@ -3181,21 +3166,6 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
3181 | } | 3166 | } |
3182 | 3167 | ||
3183 | /** | 3168 | /** |
3184 | * ixgbevf_get_stats - Get System Network Statistics | ||
3185 | * @netdev: network interface device structure | ||
3186 | * | ||
3187 | * Returns the address of the device statistics structure. | ||
3188 | * The statistics are actually updated from the timer callback. | ||
3189 | **/ | ||
3190 | static struct net_device_stats *ixgbevf_get_stats(struct net_device *netdev) | ||
3191 | { | ||
3192 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | ||
3193 | |||
3194 | /* only return the current stats */ | ||
3195 | return &adapter->net_stats; | ||
3196 | } | ||
3197 | |||
3198 | /** | ||
3199 | * ixgbevf_set_mac - Change the Ethernet Address of the NIC | 3169 | * ixgbevf_set_mac - Change the Ethernet Address of the NIC |
3200 | * @netdev: network interface device structure | 3170 | * @netdev: network interface device structure |
3201 | * @p: pointer to an address structure | 3171 | * @p: pointer to an address structure |
@@ -3230,10 +3200,16 @@ static int ixgbevf_set_mac(struct net_device *netdev, void *p) | |||
3230 | static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu) | 3200 | static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu) |
3231 | { | 3201 | { |
3232 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); | 3202 | struct ixgbevf_adapter *adapter = netdev_priv(netdev); |
3203 | struct ixgbe_hw *hw = &adapter->hw; | ||
3233 | int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; | 3204 | int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; |
3205 | int max_possible_frame = MAXIMUM_ETHERNET_VLAN_SIZE; | ||
3206 | u32 msg[2]; | ||
3207 | |||
3208 | if (adapter->hw.mac.type == ixgbe_mac_X540_vf) | ||
3209 | max_possible_frame = IXGBE_MAX_JUMBO_FRAME_SIZE; | ||
3234 | 3210 | ||
3235 | /* MTU < 68 is an error and causes problems on some kernels */ | 3211 | /* MTU < 68 is an error and causes problems on some kernels */ |
3236 | if ((new_mtu < 68) || (max_frame > MAXIMUM_ETHERNET_VLAN_SIZE)) | 3212 | if ((new_mtu < 68) || (max_frame > max_possible_frame)) |
3237 | return -EINVAL; | 3213 | return -EINVAL; |
3238 | 3214 | ||
3239 | hw_dbg(&adapter->hw, "changing MTU from %d to %d\n", | 3215 | hw_dbg(&adapter->hw, "changing MTU from %d to %d\n", |
@@ -3241,6 +3217,10 @@ static int ixgbevf_change_mtu(struct net_device *netdev, int new_mtu) | |||
3241 | /* must set new MTU before calling down or up */ | 3217 | /* must set new MTU before calling down or up */ |
3242 | netdev->mtu = new_mtu; | 3218 | netdev->mtu = new_mtu; |
3243 | 3219 | ||
3220 | msg[0] = IXGBE_VF_SET_LPE; | ||
3221 | msg[1] = max_frame; | ||
3222 | hw->mbx.ops.write_posted(hw, msg, 2); | ||
3223 | |||
3244 | if (netif_running(netdev)) | 3224 | if (netif_running(netdev)) |
3245 | ixgbevf_reinit_locked(adapter); | 3225 | ixgbevf_reinit_locked(adapter); |
3246 | 3226 | ||
@@ -3272,7 +3252,6 @@ static const struct net_device_ops ixgbe_netdev_ops = { | |||
3272 | .ndo_open = &ixgbevf_open, | 3252 | .ndo_open = &ixgbevf_open, |
3273 | .ndo_stop = &ixgbevf_close, | 3253 | .ndo_stop = &ixgbevf_close, |
3274 | .ndo_start_xmit = &ixgbevf_xmit_frame, | 3254 | .ndo_start_xmit = &ixgbevf_xmit_frame, |
3275 | .ndo_get_stats = &ixgbevf_get_stats, | ||
3276 | .ndo_set_rx_mode = &ixgbevf_set_rx_mode, | 3255 | .ndo_set_rx_mode = &ixgbevf_set_rx_mode, |
3277 | .ndo_set_multicast_list = &ixgbevf_set_rx_mode, | 3256 | .ndo_set_multicast_list = &ixgbevf_set_rx_mode, |
3278 | .ndo_validate_addr = eth_validate_addr, | 3257 | .ndo_validate_addr = eth_validate_addr, |
@@ -3286,8 +3265,6 @@ static const struct net_device_ops ixgbe_netdev_ops = { | |||
3286 | 3265 | ||
3287 | static void ixgbevf_assign_netdev_ops(struct net_device *dev) | 3266 | static void ixgbevf_assign_netdev_ops(struct net_device *dev) |
3288 | { | 3267 | { |
3289 | struct ixgbevf_adapter *adapter; | ||
3290 | adapter = netdev_priv(dev); | ||
3291 | dev->netdev_ops = &ixgbe_netdev_ops; | 3268 | dev->netdev_ops = &ixgbe_netdev_ops; |
3292 | ixgbevf_set_ethtool_ops(dev); | 3269 | ixgbevf_set_ethtool_ops(dev); |
3293 | dev->watchdog_timeo = 5 * HZ; | 3270 | dev->watchdog_timeo = 5 * HZ; |
@@ -3426,7 +3403,7 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, | |||
3426 | } | 3403 | } |
3427 | 3404 | ||
3428 | init_timer(&adapter->watchdog_timer); | 3405 | init_timer(&adapter->watchdog_timer); |
3429 | adapter->watchdog_timer.function = &ixgbevf_watchdog; | 3406 | adapter->watchdog_timer.function = ixgbevf_watchdog; |
3430 | adapter->watchdog_timer.data = (unsigned long)adapter; | 3407 | adapter->watchdog_timer.data = (unsigned long)adapter; |
3431 | 3408 | ||
3432 | INIT_WORK(&adapter->reset_task, ixgbevf_reset_task); | 3409 | INIT_WORK(&adapter->reset_task, ixgbevf_reset_task); |
@@ -3440,10 +3417,6 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, | |||
3440 | if (hw->mac.ops.get_bus_info) | 3417 | if (hw->mac.ops.get_bus_info) |
3441 | hw->mac.ops.get_bus_info(hw); | 3418 | hw->mac.ops.get_bus_info(hw); |
3442 | 3419 | ||
3443 | |||
3444 | netif_carrier_off(netdev); | ||
3445 | netif_tx_stop_all_queues(netdev); | ||
3446 | |||
3447 | strcpy(netdev->name, "eth%d"); | 3420 | strcpy(netdev->name, "eth%d"); |
3448 | 3421 | ||
3449 | err = register_netdev(netdev); | 3422 | err = register_netdev(netdev); |
@@ -3452,6 +3425,8 @@ static int __devinit ixgbevf_probe(struct pci_dev *pdev, | |||
3452 | 3425 | ||
3453 | adapter->netdev_registered = true; | 3426 | adapter->netdev_registered = true; |
3454 | 3427 | ||
3428 | netif_carrier_off(netdev); | ||
3429 | |||
3455 | ixgbevf_init_last_counter_stats(adapter); | 3430 | ixgbevf_init_last_counter_stats(adapter); |
3456 | 3431 | ||
3457 | /* print the MAC address */ | 3432 | /* print the MAC address */ |
@@ -3503,10 +3478,9 @@ static void __devexit ixgbevf_remove(struct pci_dev *pdev) | |||
3503 | 3478 | ||
3504 | del_timer_sync(&adapter->watchdog_timer); | 3479 | del_timer_sync(&adapter->watchdog_timer); |
3505 | 3480 | ||
3481 | cancel_work_sync(&adapter->reset_task); | ||
3506 | cancel_work_sync(&adapter->watchdog_task); | 3482 | cancel_work_sync(&adapter->watchdog_task); |
3507 | 3483 | ||
3508 | flush_scheduled_work(); | ||
3509 | |||
3510 | if (adapter->netdev_registered) { | 3484 | if (adapter->netdev_registered) { |
3511 | unregister_netdev(netdev); | 3485 | unregister_netdev(netdev); |
3512 | adapter->netdev_registered = false; | 3486 | adapter->netdev_registered = false; |
@@ -3536,9 +3510,9 @@ static struct pci_driver ixgbevf_driver = { | |||
3536 | }; | 3510 | }; |
3537 | 3511 | ||
3538 | /** | 3512 | /** |
3539 | * ixgbe_init_module - Driver Registration Routine | 3513 | * ixgbevf_init_module - Driver Registration Routine |
3540 | * | 3514 | * |
3541 | * ixgbe_init_module is the first routine called when the driver is | 3515 | * ixgbevf_init_module is the first routine called when the driver is |
3542 | * loaded. All it does is register with the PCI subsystem. | 3516 | * loaded. All it does is register with the PCI subsystem. |
3543 | **/ | 3517 | **/ |
3544 | static int __init ixgbevf_init_module(void) | 3518 | static int __init ixgbevf_init_module(void) |
@@ -3556,9 +3530,9 @@ static int __init ixgbevf_init_module(void) | |||
3556 | module_init(ixgbevf_init_module); | 3530 | module_init(ixgbevf_init_module); |
3557 | 3531 | ||
3558 | /** | 3532 | /** |
3559 | * ixgbe_exit_module - Driver Exit Cleanup Routine | 3533 | * ixgbevf_exit_module - Driver Exit Cleanup Routine |
3560 | * | 3534 | * |
3561 | * ixgbe_exit_module is called just before the driver is removed | 3535 | * ixgbevf_exit_module is called just before the driver is removed |
3562 | * from memory. | 3536 | * from memory. |
3563 | **/ | 3537 | **/ |
3564 | static void __exit ixgbevf_exit_module(void) | 3538 | static void __exit ixgbevf_exit_module(void) |
@@ -3568,7 +3542,7 @@ static void __exit ixgbevf_exit_module(void) | |||
3568 | 3542 | ||
3569 | #ifdef DEBUG | 3543 | #ifdef DEBUG |
3570 | /** | 3544 | /** |
3571 | * ixgbe_get_hw_dev_name - return device name string | 3545 | * ixgbevf_get_hw_dev_name - return device name string |
3572 | * used by hardware layer to print debugging information | 3546 | * used by hardware layer to print debugging information |
3573 | **/ | 3547 | **/ |
3574 | char *ixgbevf_get_hw_dev_name(struct ixgbe_hw *hw) | 3548 | char *ixgbevf_get_hw_dev_name(struct ixgbe_hw *hw) |
diff --git a/drivers/net/ixgbevf/mbx.c b/drivers/net/ixgbevf/mbx.c index b8143501e6fc..7a8833125770 100644 --- a/drivers/net/ixgbevf/mbx.c +++ b/drivers/net/ixgbevf/mbx.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -308,7 +308,7 @@ out_no_read: | |||
308 | * | 308 | * |
309 | * Initializes the hw->mbx struct to correct values for vf mailbox | 309 | * Initializes the hw->mbx struct to correct values for vf mailbox |
310 | */ | 310 | */ |
311 | s32 ixgbevf_init_mbx_params_vf(struct ixgbe_hw *hw) | 311 | static s32 ixgbevf_init_mbx_params_vf(struct ixgbe_hw *hw) |
312 | { | 312 | { |
313 | struct ixgbe_mbx_info *mbx = &hw->mbx; | 313 | struct ixgbe_mbx_info *mbx = &hw->mbx; |
314 | 314 | ||
diff --git a/drivers/net/ixgbevf/mbx.h b/drivers/net/ixgbevf/mbx.h index 1b0e0bf4c0f5..ea393eb03f3a 100644 --- a/drivers/net/ixgbevf/mbx.h +++ b/drivers/net/ixgbevf/mbx.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -81,6 +81,7 @@ | |||
81 | #define IXGBE_VF_SET_MULTICAST 0x03 /* VF requests PF to set MC addr */ | 81 | #define IXGBE_VF_SET_MULTICAST 0x03 /* VF requests PF to set MC addr */ |
82 | #define IXGBE_VF_SET_VLAN 0x04 /* VF requests PF to set VLAN */ | 82 | #define IXGBE_VF_SET_VLAN 0x04 /* VF requests PF to set VLAN */ |
83 | #define IXGBE_VF_SET_LPE 0x05 /* VF requests PF to set VMOLR.LPE */ | 83 | #define IXGBE_VF_SET_LPE 0x05 /* VF requests PF to set VMOLR.LPE */ |
84 | #define IXGBE_VF_SET_MACVLAN 0x06 /* VF requests PF for unicast filter */ | ||
84 | 85 | ||
85 | /* length of permanent address message returned from PF */ | 86 | /* length of permanent address message returned from PF */ |
86 | #define IXGBE_VF_PERMADDR_MSG_LEN 4 | 87 | #define IXGBE_VF_PERMADDR_MSG_LEN 4 |
@@ -95,6 +96,4 @@ | |||
95 | /* forward declaration of the HW struct */ | 96 | /* forward declaration of the HW struct */ |
96 | struct ixgbe_hw; | 97 | struct ixgbe_hw; |
97 | 98 | ||
98 | s32 ixgbevf_init_mbx_params_vf(struct ixgbe_hw *); | ||
99 | |||
100 | #endif /* _IXGBE_MBX_H_ */ | 99 | #endif /* _IXGBE_MBX_H_ */ |
diff --git a/drivers/net/ixgbevf/regs.h b/drivers/net/ixgbevf/regs.h index 12f75960aec1..189200eeca26 100644 --- a/drivers/net/ixgbevf/regs.h +++ b/drivers/net/ixgbevf/regs.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -31,7 +31,7 @@ | |||
31 | #define IXGBE_VFCTRL 0x00000 | 31 | #define IXGBE_VFCTRL 0x00000 |
32 | #define IXGBE_VFSTATUS 0x00008 | 32 | #define IXGBE_VFSTATUS 0x00008 |
33 | #define IXGBE_VFLINKS 0x00010 | 33 | #define IXGBE_VFLINKS 0x00010 |
34 | #define IXGBE_VFRTIMER 0x00048 | 34 | #define IXGBE_VFFRTIMER 0x00048 |
35 | #define IXGBE_VFRXMEMWRAP 0x03190 | 35 | #define IXGBE_VFRXMEMWRAP 0x03190 |
36 | #define IXGBE_VTEICR 0x00100 | 36 | #define IXGBE_VTEICR 0x00100 |
37 | #define IXGBE_VTEICS 0x00104 | 37 | #define IXGBE_VTEICS 0x00104 |
diff --git a/drivers/net/ixgbevf/vf.c b/drivers/net/ixgbevf/vf.c index f6f929958ba0..aa3682e8c473 100644 --- a/drivers/net/ixgbevf/vf.c +++ b/drivers/net/ixgbevf/vf.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -216,6 +216,39 @@ static s32 ixgbevf_get_mac_addr_vf(struct ixgbe_hw *hw, u8 *mac_addr) | |||
216 | return 0; | 216 | return 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | static s32 ixgbevf_set_uc_addr_vf(struct ixgbe_hw *hw, u32 index, u8 *addr) | ||
220 | { | ||
221 | struct ixgbe_mbx_info *mbx = &hw->mbx; | ||
222 | u32 msgbuf[3]; | ||
223 | u8 *msg_addr = (u8 *)(&msgbuf[1]); | ||
224 | s32 ret_val; | ||
225 | |||
226 | memset(msgbuf, 0, sizeof(msgbuf)); | ||
227 | /* | ||
228 | * If index is one then this is the start of a new list and needs | ||
229 | * indication to the PF so it can do it's own list management. | ||
230 | * If it is zero then that tells the PF to just clear all of | ||
231 | * this VF's macvlans and there is no new list. | ||
232 | */ | ||
233 | msgbuf[0] |= index << IXGBE_VT_MSGINFO_SHIFT; | ||
234 | msgbuf[0] |= IXGBE_VF_SET_MACVLAN; | ||
235 | if (addr) | ||
236 | memcpy(msg_addr, addr, 6); | ||
237 | ret_val = mbx->ops.write_posted(hw, msgbuf, 3); | ||
238 | |||
239 | if (!ret_val) | ||
240 | ret_val = mbx->ops.read_posted(hw, msgbuf, 3); | ||
241 | |||
242 | msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS; | ||
243 | |||
244 | if (!ret_val) | ||
245 | if (msgbuf[0] == | ||
246 | (IXGBE_VF_SET_MACVLAN | IXGBE_VT_MSGTYPE_NACK)) | ||
247 | ret_val = -ENOMEM; | ||
248 | |||
249 | return ret_val; | ||
250 | } | ||
251 | |||
219 | /** | 252 | /** |
220 | * ixgbevf_set_rar_vf - set device MAC address | 253 | * ixgbevf_set_rar_vf - set device MAC address |
221 | * @hw: pointer to hardware structure | 254 | * @hw: pointer to hardware structure |
@@ -368,7 +401,7 @@ static s32 ixgbevf_check_mac_link_vf(struct ixgbe_hw *hw, | |||
368 | return 0; | 401 | return 0; |
369 | } | 402 | } |
370 | 403 | ||
371 | struct ixgbe_mac_operations ixgbevf_mac_ops = { | 404 | static struct ixgbe_mac_operations ixgbevf_mac_ops = { |
372 | .init_hw = ixgbevf_init_hw_vf, | 405 | .init_hw = ixgbevf_init_hw_vf, |
373 | .reset_hw = ixgbevf_reset_hw_vf, | 406 | .reset_hw = ixgbevf_reset_hw_vf, |
374 | .start_hw = ixgbevf_start_hw_vf, | 407 | .start_hw = ixgbevf_start_hw_vf, |
@@ -378,11 +411,16 @@ struct ixgbe_mac_operations ixgbevf_mac_ops = { | |||
378 | .check_link = ixgbevf_check_mac_link_vf, | 411 | .check_link = ixgbevf_check_mac_link_vf, |
379 | .set_rar = ixgbevf_set_rar_vf, | 412 | .set_rar = ixgbevf_set_rar_vf, |
380 | .update_mc_addr_list = ixgbevf_update_mc_addr_list_vf, | 413 | .update_mc_addr_list = ixgbevf_update_mc_addr_list_vf, |
414 | .set_uc_addr = ixgbevf_set_uc_addr_vf, | ||
381 | .set_vfta = ixgbevf_set_vfta_vf, | 415 | .set_vfta = ixgbevf_set_vfta_vf, |
382 | }; | 416 | }; |
383 | 417 | ||
384 | struct ixgbevf_info ixgbevf_vf_info = { | 418 | struct ixgbevf_info ixgbevf_82599_vf_info = { |
385 | .mac = ixgbe_mac_82599_vf, | 419 | .mac = ixgbe_mac_82599_vf, |
386 | .mac_ops = &ixgbevf_mac_ops, | 420 | .mac_ops = &ixgbevf_mac_ops, |
387 | }; | 421 | }; |
388 | 422 | ||
423 | struct ixgbevf_info ixgbevf_X540_vf_info = { | ||
424 | .mac = ixgbe_mac_X540_vf, | ||
425 | .mac_ops = &ixgbevf_mac_ops, | ||
426 | }; | ||
diff --git a/drivers/net/ixgbevf/vf.h b/drivers/net/ixgbevf/vf.h index 94b750b8874f..10306b492ee6 100644 --- a/drivers/net/ixgbevf/vf.h +++ b/drivers/net/ixgbevf/vf.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /******************************************************************************* | 1 | /******************************************************************************* |
2 | 2 | ||
3 | Intel 82599 Virtual Function driver | 3 | Intel 82599 Virtual Function driver |
4 | Copyright(c) 1999 - 2009 Intel Corporation. | 4 | Copyright(c) 1999 - 2010 Intel Corporation. |
5 | 5 | ||
6 | This program is free software; you can redistribute it and/or modify it | 6 | This program is free software; you can redistribute it and/or modify it |
7 | under the terms and conditions of the GNU General Public License, | 7 | under the terms and conditions of the GNU General Public License, |
@@ -62,6 +62,7 @@ struct ixgbe_mac_operations { | |||
62 | 62 | ||
63 | /* RAR, Multicast, VLAN */ | 63 | /* RAR, Multicast, VLAN */ |
64 | s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32); | 64 | s32 (*set_rar)(struct ixgbe_hw *, u32, u8 *, u32); |
65 | s32 (*set_uc_addr)(struct ixgbe_hw *, u32, u8 *); | ||
65 | s32 (*init_rx_addrs)(struct ixgbe_hw *); | 66 | s32 (*init_rx_addrs)(struct ixgbe_hw *); |
66 | s32 (*update_mc_addr_list)(struct ixgbe_hw *, struct net_device *); | 67 | s32 (*update_mc_addr_list)(struct ixgbe_hw *, struct net_device *); |
67 | s32 (*enable_mc)(struct ixgbe_hw *); | 68 | s32 (*enable_mc)(struct ixgbe_hw *); |
@@ -73,6 +74,7 @@ struct ixgbe_mac_operations { | |||
73 | enum ixgbe_mac_type { | 74 | enum ixgbe_mac_type { |
74 | ixgbe_mac_unknown = 0, | 75 | ixgbe_mac_unknown = 0, |
75 | ixgbe_mac_82599_vf, | 76 | ixgbe_mac_82599_vf, |
77 | ixgbe_mac_X540_vf, | ||
76 | ixgbe_num_macs | 78 | ixgbe_num_macs |
77 | }; | 79 | }; |
78 | 80 | ||
@@ -124,8 +126,6 @@ struct ixgbe_hw { | |||
124 | void *back; | 126 | void *back; |
125 | 127 | ||
126 | u8 __iomem *hw_addr; | 128 | u8 __iomem *hw_addr; |
127 | u8 *flash_address; | ||
128 | unsigned long io_base; | ||
129 | 129 | ||
130 | struct ixgbe_mac_info mac; | 130 | struct ixgbe_mac_info mac; |
131 | struct ixgbe_mbx_info mbx; | 131 | struct ixgbe_mbx_info mbx; |