diff options
Diffstat (limited to 'drivers/net/ethernet/intel')
| -rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000.h | 7 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/e1000/e1000_main.c | 60 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/e1000e/80003es2lan.c | 7 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/e1000e/netdev.c | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/e1000e/phy.c | 10 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_main.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/igb/e1000_phy.c | 5 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/igb/igb_ethtool.c | 7 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | 1 | ||||
| -rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 2 |
12 files changed, 61 insertions, 57 deletions
diff --git a/drivers/net/ethernet/intel/e1000/e1000.h b/drivers/net/ethernet/intel/e1000/e1000.h index 58c147271a36..f9313b36c887 100644 --- a/drivers/net/ethernet/intel/e1000/e1000.h +++ b/drivers/net/ethernet/intel/e1000/e1000.h | |||
| @@ -83,6 +83,11 @@ struct e1000_adapter; | |||
| 83 | 83 | ||
| 84 | #define E1000_MAX_INTR 10 | 84 | #define E1000_MAX_INTR 10 |
| 85 | 85 | ||
| 86 | /* | ||
| 87 | * Count for polling __E1000_RESET condition every 10-20msec. | ||
| 88 | */ | ||
| 89 | #define E1000_CHECK_RESET_COUNT 50 | ||
| 90 | |||
| 86 | /* TX/RX descriptor defines */ | 91 | /* TX/RX descriptor defines */ |
| 87 | #define E1000_DEFAULT_TXD 256 | 92 | #define E1000_DEFAULT_TXD 256 |
| 88 | #define E1000_MAX_TXD 256 | 93 | #define E1000_MAX_TXD 256 |
| @@ -312,8 +317,6 @@ struct e1000_adapter { | |||
| 312 | struct delayed_work watchdog_task; | 317 | struct delayed_work watchdog_task; |
| 313 | struct delayed_work fifo_stall_task; | 318 | struct delayed_work fifo_stall_task; |
| 314 | struct delayed_work phy_info_task; | 319 | struct delayed_work phy_info_task; |
| 315 | |||
| 316 | struct mutex mutex; | ||
| 317 | }; | 320 | }; |
| 318 | 321 | ||
| 319 | enum e1000_state_t { | 322 | enum e1000_state_t { |
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c index e38622825fa7..46e6544ed1b7 100644 --- a/drivers/net/ethernet/intel/e1000/e1000_main.c +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c | |||
| @@ -494,13 +494,20 @@ static void e1000_down_and_stop(struct e1000_adapter *adapter) | |||
| 494 | { | 494 | { |
| 495 | set_bit(__E1000_DOWN, &adapter->flags); | 495 | set_bit(__E1000_DOWN, &adapter->flags); |
| 496 | 496 | ||
| 497 | /* Only kill reset task if adapter is not resetting */ | ||
| 498 | if (!test_bit(__E1000_RESETTING, &adapter->flags)) | ||
| 499 | cancel_work_sync(&adapter->reset_task); | ||
| 500 | |||
| 501 | cancel_delayed_work_sync(&adapter->watchdog_task); | 497 | cancel_delayed_work_sync(&adapter->watchdog_task); |
| 498 | |||
| 499 | /* | ||
| 500 | * Since the watchdog task can reschedule other tasks, we should cancel | ||
| 501 | * it first, otherwise we can run into the situation when a work is | ||
| 502 | * still running after the adapter has been turned down. | ||
| 503 | */ | ||
| 504 | |||
| 502 | cancel_delayed_work_sync(&adapter->phy_info_task); | 505 | cancel_delayed_work_sync(&adapter->phy_info_task); |
| 503 | cancel_delayed_work_sync(&adapter->fifo_stall_task); | 506 | cancel_delayed_work_sync(&adapter->fifo_stall_task); |
| 507 | |||
| 508 | /* Only kill reset task if adapter is not resetting */ | ||
| 509 | if (!test_bit(__E1000_RESETTING, &adapter->flags)) | ||
| 510 | cancel_work_sync(&adapter->reset_task); | ||
| 504 | } | 511 | } |
| 505 | 512 | ||
| 506 | void e1000_down(struct e1000_adapter *adapter) | 513 | void e1000_down(struct e1000_adapter *adapter) |
| @@ -544,21 +551,8 @@ void e1000_down(struct e1000_adapter *adapter) | |||
| 544 | e1000_clean_all_rx_rings(adapter); | 551 | e1000_clean_all_rx_rings(adapter); |
| 545 | } | 552 | } |
| 546 | 553 | ||
| 547 | static void e1000_reinit_safe(struct e1000_adapter *adapter) | ||
| 548 | { | ||
| 549 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) | ||
| 550 | msleep(1); | ||
| 551 | mutex_lock(&adapter->mutex); | ||
| 552 | e1000_down(adapter); | ||
| 553 | e1000_up(adapter); | ||
| 554 | mutex_unlock(&adapter->mutex); | ||
| 555 | clear_bit(__E1000_RESETTING, &adapter->flags); | ||
| 556 | } | ||
| 557 | |||
| 558 | void e1000_reinit_locked(struct e1000_adapter *adapter) | 554 | void e1000_reinit_locked(struct e1000_adapter *adapter) |
| 559 | { | 555 | { |
| 560 | /* if rtnl_lock is not held the call path is bogus */ | ||
| 561 | ASSERT_RTNL(); | ||
| 562 | WARN_ON(in_interrupt()); | 556 | WARN_ON(in_interrupt()); |
| 563 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) | 557 | while (test_and_set_bit(__E1000_RESETTING, &adapter->flags)) |
| 564 | msleep(1); | 558 | msleep(1); |
| @@ -1316,7 +1310,6 @@ static int e1000_sw_init(struct e1000_adapter *adapter) | |||
| 1316 | e1000_irq_disable(adapter); | 1310 | e1000_irq_disable(adapter); |
| 1317 | 1311 | ||
| 1318 | spin_lock_init(&adapter->stats_lock); | 1312 | spin_lock_init(&adapter->stats_lock); |
| 1319 | mutex_init(&adapter->mutex); | ||
| 1320 | 1313 | ||
| 1321 | set_bit(__E1000_DOWN, &adapter->flags); | 1314 | set_bit(__E1000_DOWN, &adapter->flags); |
| 1322 | 1315 | ||
| @@ -1440,6 +1433,10 @@ static int e1000_close(struct net_device *netdev) | |||
| 1440 | { | 1433 | { |
| 1441 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1434 | struct e1000_adapter *adapter = netdev_priv(netdev); |
| 1442 | struct e1000_hw *hw = &adapter->hw; | 1435 | struct e1000_hw *hw = &adapter->hw; |
| 1436 | int count = E1000_CHECK_RESET_COUNT; | ||
| 1437 | |||
| 1438 | while (test_bit(__E1000_RESETTING, &adapter->flags) && count--) | ||
| 1439 | usleep_range(10000, 20000); | ||
| 1443 | 1440 | ||
| 1444 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); | 1441 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); |
| 1445 | e1000_down(adapter); | 1442 | e1000_down(adapter); |
| @@ -2325,11 +2322,8 @@ static void e1000_update_phy_info_task(struct work_struct *work) | |||
| 2325 | struct e1000_adapter *adapter = container_of(work, | 2322 | struct e1000_adapter *adapter = container_of(work, |
| 2326 | struct e1000_adapter, | 2323 | struct e1000_adapter, |
| 2327 | phy_info_task.work); | 2324 | phy_info_task.work); |
| 2328 | if (test_bit(__E1000_DOWN, &adapter->flags)) | 2325 | |
| 2329 | return; | ||
| 2330 | mutex_lock(&adapter->mutex); | ||
| 2331 | e1000_phy_get_info(&adapter->hw, &adapter->phy_info); | 2326 | e1000_phy_get_info(&adapter->hw, &adapter->phy_info); |
| 2332 | mutex_unlock(&adapter->mutex); | ||
| 2333 | } | 2327 | } |
| 2334 | 2328 | ||
| 2335 | /** | 2329 | /** |
| @@ -2345,9 +2339,6 @@ static void e1000_82547_tx_fifo_stall_task(struct work_struct *work) | |||
| 2345 | struct net_device *netdev = adapter->netdev; | 2339 | struct net_device *netdev = adapter->netdev; |
| 2346 | u32 tctl; | 2340 | u32 tctl; |
| 2347 | 2341 | ||
| 2348 | if (test_bit(__E1000_DOWN, &adapter->flags)) | ||
| 2349 | return; | ||
| 2350 | mutex_lock(&adapter->mutex); | ||
| 2351 | if (atomic_read(&adapter->tx_fifo_stall)) { | 2342 | if (atomic_read(&adapter->tx_fifo_stall)) { |
| 2352 | if ((er32(TDT) == er32(TDH)) && | 2343 | if ((er32(TDT) == er32(TDH)) && |
| 2353 | (er32(TDFT) == er32(TDFH)) && | 2344 | (er32(TDFT) == er32(TDFH)) && |
| @@ -2368,7 +2359,6 @@ static void e1000_82547_tx_fifo_stall_task(struct work_struct *work) | |||
| 2368 | schedule_delayed_work(&adapter->fifo_stall_task, 1); | 2359 | schedule_delayed_work(&adapter->fifo_stall_task, 1); |
| 2369 | } | 2360 | } |
| 2370 | } | 2361 | } |
| 2371 | mutex_unlock(&adapter->mutex); | ||
| 2372 | } | 2362 | } |
| 2373 | 2363 | ||
| 2374 | bool e1000_has_link(struct e1000_adapter *adapter) | 2364 | bool e1000_has_link(struct e1000_adapter *adapter) |
| @@ -2422,10 +2412,6 @@ static void e1000_watchdog(struct work_struct *work) | |||
| 2422 | struct e1000_tx_ring *txdr = adapter->tx_ring; | 2412 | struct e1000_tx_ring *txdr = adapter->tx_ring; |
| 2423 | u32 link, tctl; | 2413 | u32 link, tctl; |
| 2424 | 2414 | ||
| 2425 | if (test_bit(__E1000_DOWN, &adapter->flags)) | ||
| 2426 | return; | ||
| 2427 | |||
| 2428 | mutex_lock(&adapter->mutex); | ||
| 2429 | link = e1000_has_link(adapter); | 2415 | link = e1000_has_link(adapter); |
| 2430 | if ((netif_carrier_ok(netdev)) && link) | 2416 | if ((netif_carrier_ok(netdev)) && link) |
| 2431 | goto link_up; | 2417 | goto link_up; |
| @@ -2516,7 +2502,7 @@ link_up: | |||
| 2516 | adapter->tx_timeout_count++; | 2502 | adapter->tx_timeout_count++; |
| 2517 | schedule_work(&adapter->reset_task); | 2503 | schedule_work(&adapter->reset_task); |
| 2518 | /* exit immediately since reset is imminent */ | 2504 | /* exit immediately since reset is imminent */ |
| 2519 | goto unlock; | 2505 | return; |
| 2520 | } | 2506 | } |
| 2521 | } | 2507 | } |
| 2522 | 2508 | ||
| @@ -2544,9 +2530,6 @@ link_up: | |||
| 2544 | /* Reschedule the task */ | 2530 | /* Reschedule the task */ |
| 2545 | if (!test_bit(__E1000_DOWN, &adapter->flags)) | 2531 | if (!test_bit(__E1000_DOWN, &adapter->flags)) |
| 2546 | schedule_delayed_work(&adapter->watchdog_task, 2 * HZ); | 2532 | schedule_delayed_work(&adapter->watchdog_task, 2 * HZ); |
| 2547 | |||
| 2548 | unlock: | ||
| 2549 | mutex_unlock(&adapter->mutex); | ||
| 2550 | } | 2533 | } |
| 2551 | 2534 | ||
| 2552 | enum latency_range { | 2535 | enum latency_range { |
| @@ -3495,10 +3478,8 @@ static void e1000_reset_task(struct work_struct *work) | |||
| 3495 | struct e1000_adapter *adapter = | 3478 | struct e1000_adapter *adapter = |
| 3496 | container_of(work, struct e1000_adapter, reset_task); | 3479 | container_of(work, struct e1000_adapter, reset_task); |
| 3497 | 3480 | ||
| 3498 | if (test_bit(__E1000_DOWN, &adapter->flags)) | ||
| 3499 | return; | ||
| 3500 | e_err(drv, "Reset adapter\n"); | 3481 | e_err(drv, "Reset adapter\n"); |
| 3501 | e1000_reinit_safe(adapter); | 3482 | e1000_reinit_locked(adapter); |
| 3502 | } | 3483 | } |
| 3503 | 3484 | ||
| 3504 | /** | 3485 | /** |
| @@ -4963,6 +4944,11 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake) | |||
| 4963 | netif_device_detach(netdev); | 4944 | netif_device_detach(netdev); |
| 4964 | 4945 | ||
| 4965 | if (netif_running(netdev)) { | 4946 | if (netif_running(netdev)) { |
| 4947 | int count = E1000_CHECK_RESET_COUNT; | ||
| 4948 | |||
| 4949 | while (test_bit(__E1000_RESETTING, &adapter->flags) && count--) | ||
| 4950 | usleep_range(10000, 20000); | ||
| 4951 | |||
| 4966 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); | 4952 | WARN_ON(test_bit(__E1000_RESETTING, &adapter->flags)); |
| 4967 | e1000_down(adapter); | 4953 | e1000_down(adapter); |
| 4968 | } | 4954 | } |
diff --git a/drivers/net/ethernet/intel/e1000e/80003es2lan.c b/drivers/net/ethernet/intel/e1000e/80003es2lan.c index 895450e9bb3c..ff2d806eaef7 100644 --- a/drivers/net/ethernet/intel/e1000e/80003es2lan.c +++ b/drivers/net/ethernet/intel/e1000e/80003es2lan.c | |||
| @@ -718,8 +718,11 @@ static s32 e1000_reset_hw_80003es2lan(struct e1000_hw *hw) | |||
| 718 | e1000_release_phy_80003es2lan(hw); | 718 | e1000_release_phy_80003es2lan(hw); |
| 719 | 719 | ||
| 720 | /* Disable IBIST slave mode (far-end loopback) */ | 720 | /* Disable IBIST slave mode (far-end loopback) */ |
| 721 | e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, | 721 | ret_val = |
| 722 | &kum_reg_data); | 722 | e1000_read_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, |
| 723 | &kum_reg_data); | ||
| 724 | if (ret_val) | ||
| 725 | return ret_val; | ||
| 723 | kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; | 726 | kum_reg_data |= E1000_KMRNCTRLSTA_IBIST_DISABLE; |
| 724 | e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, | 727 | e1000_write_kmrn_reg_80003es2lan(hw, E1000_KMRNCTRLSTA_INBAND_PARAM, |
| 725 | kum_reg_data); | 728 | kum_reg_data); |
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 8d3945ab7334..c30d41d6e426 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c | |||
| @@ -6174,7 +6174,7 @@ static int __e1000_resume(struct pci_dev *pdev) | |||
| 6174 | return 0; | 6174 | return 0; |
| 6175 | } | 6175 | } |
| 6176 | 6176 | ||
| 6177 | #ifdef CONFIG_PM_SLEEP | 6177 | #ifdef CONFIG_PM |
| 6178 | static int e1000_suspend(struct device *dev) | 6178 | static int e1000_suspend(struct device *dev) |
| 6179 | { | 6179 | { |
| 6180 | struct pci_dev *pdev = to_pci_dev(dev); | 6180 | struct pci_dev *pdev = to_pci_dev(dev); |
| @@ -6193,7 +6193,7 @@ static int e1000_resume(struct device *dev) | |||
| 6193 | 6193 | ||
| 6194 | return __e1000_resume(pdev); | 6194 | return __e1000_resume(pdev); |
| 6195 | } | 6195 | } |
| 6196 | #endif /* CONFIG_PM_SLEEP */ | 6196 | #endif /* CONFIG_PM */ |
| 6197 | 6197 | ||
| 6198 | #ifdef CONFIG_PM_RUNTIME | 6198 | #ifdef CONFIG_PM_RUNTIME |
| 6199 | static int e1000_runtime_suspend(struct device *dev) | 6199 | static int e1000_runtime_suspend(struct device *dev) |
diff --git a/drivers/net/ethernet/intel/e1000e/phy.c b/drivers/net/ethernet/intel/e1000e/phy.c index da2be59505c0..20e71f4ca426 100644 --- a/drivers/net/ethernet/intel/e1000e/phy.c +++ b/drivers/net/ethernet/intel/e1000e/phy.c | |||
| @@ -1757,19 +1757,23 @@ s32 e1000e_phy_has_link_generic(struct e1000_hw *hw, u32 iterations, | |||
| 1757 | * it across the board. | 1757 | * it across the board. |
| 1758 | */ | 1758 | */ |
| 1759 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); | 1759 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); |
| 1760 | if (ret_val) | 1760 | if (ret_val) { |
| 1761 | /* If the first read fails, another entity may have | 1761 | /* If the first read fails, another entity may have |
| 1762 | * ownership of the resources, wait and try again to | 1762 | * ownership of the resources, wait and try again to |
| 1763 | * see if they have relinquished the resources yet. | 1763 | * see if they have relinquished the resources yet. |
| 1764 | */ | 1764 | */ |
| 1765 | udelay(usec_interval); | 1765 | if (usec_interval >= 1000) |
| 1766 | msleep(usec_interval / 1000); | ||
| 1767 | else | ||
| 1768 | udelay(usec_interval); | ||
| 1769 | } | ||
| 1766 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); | 1770 | ret_val = e1e_rphy(hw, MII_BMSR, &phy_status); |
| 1767 | if (ret_val) | 1771 | if (ret_val) |
| 1768 | break; | 1772 | break; |
| 1769 | if (phy_status & BMSR_LSTATUS) | 1773 | if (phy_status & BMSR_LSTATUS) |
| 1770 | break; | 1774 | break; |
| 1771 | if (usec_interval >= 1000) | 1775 | if (usec_interval >= 1000) |
| 1772 | mdelay(usec_interval / 1000); | 1776 | msleep(usec_interval / 1000); |
| 1773 | else | 1777 | else |
| 1774 | udelay(usec_interval); | 1778 | udelay(usec_interval); |
| 1775 | } | 1779 | } |
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index be15938ba213..12b0932204ba 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c | |||
| @@ -354,6 +354,9 @@ static struct rtnl_link_stats64 *i40e_get_netdev_stats_struct( | |||
| 354 | struct rtnl_link_stats64 *vsi_stats = i40e_get_vsi_stats_struct(vsi); | 354 | struct rtnl_link_stats64 *vsi_stats = i40e_get_vsi_stats_struct(vsi); |
| 355 | int i; | 355 | int i; |
| 356 | 356 | ||
| 357 | if (!vsi->tx_rings) | ||
| 358 | return stats; | ||
| 359 | |||
| 357 | rcu_read_lock(); | 360 | rcu_read_lock(); |
| 358 | for (i = 0; i < vsi->num_queue_pairs; i++) { | 361 | for (i = 0; i < vsi->num_queue_pairs; i++) { |
| 359 | struct i40e_ring *tx_ring, *rx_ring; | 362 | struct i40e_ring *tx_ring, *rx_ring; |
diff --git a/drivers/net/ethernet/intel/igb/e1000_phy.c b/drivers/net/ethernet/intel/igb/e1000_phy.c index c4c4fe332c7e..ad2b74d95138 100644 --- a/drivers/net/ethernet/intel/igb/e1000_phy.c +++ b/drivers/net/ethernet/intel/igb/e1000_phy.c | |||
| @@ -1728,7 +1728,10 @@ s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations, | |||
| 1728 | * ownership of the resources, wait and try again to | 1728 | * ownership of the resources, wait and try again to |
| 1729 | * see if they have relinquished the resources yet. | 1729 | * see if they have relinquished the resources yet. |
| 1730 | */ | 1730 | */ |
| 1731 | udelay(usec_interval); | 1731 | if (usec_interval >= 1000) |
| 1732 | mdelay(usec_interval/1000); | ||
| 1733 | else | ||
| 1734 | udelay(usec_interval); | ||
| 1732 | } | 1735 | } |
| 1733 | ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); | 1736 | ret_val = hw->phy.ops.read_reg(hw, PHY_STATUS, &phy_status); |
| 1734 | if (ret_val) | 1737 | if (ret_val) |
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index b0f3666b1d7f..c3143da497c8 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c | |||
| @@ -2062,14 +2062,15 @@ static void igb_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
| 2062 | { | 2062 | { |
| 2063 | struct igb_adapter *adapter = netdev_priv(netdev); | 2063 | struct igb_adapter *adapter = netdev_priv(netdev); |
| 2064 | 2064 | ||
| 2065 | wol->supported = WAKE_UCAST | WAKE_MCAST | | ||
| 2066 | WAKE_BCAST | WAKE_MAGIC | | ||
| 2067 | WAKE_PHY; | ||
| 2068 | wol->wolopts = 0; | 2065 | wol->wolopts = 0; |
| 2069 | 2066 | ||
| 2070 | if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED)) | 2067 | if (!(adapter->flags & IGB_FLAG_WOL_SUPPORTED)) |
| 2071 | return; | 2068 | return; |
| 2072 | 2069 | ||
| 2070 | wol->supported = WAKE_UCAST | WAKE_MCAST | | ||
| 2071 | WAKE_BCAST | WAKE_MAGIC | | ||
| 2072 | WAKE_PHY; | ||
| 2073 | |||
| 2073 | /* apply any specific unsupported masks here */ | 2074 | /* apply any specific unsupported masks here */ |
| 2074 | switch (adapter->hw.device_id) { | 2075 | switch (adapter->hw.device_id) { |
| 2075 | default: | 2076 | default: |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 0c55079ebee3..cc06854296a3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
| @@ -4251,8 +4251,8 @@ static void ixgbe_disable_fwd_ring(struct ixgbe_fwd_adapter *vadapter, | |||
| 4251 | rx_ring->l2_accel_priv = NULL; | 4251 | rx_ring->l2_accel_priv = NULL; |
| 4252 | } | 4252 | } |
| 4253 | 4253 | ||
| 4254 | int ixgbe_fwd_ring_down(struct net_device *vdev, | 4254 | static int ixgbe_fwd_ring_down(struct net_device *vdev, |
| 4255 | struct ixgbe_fwd_adapter *accel) | 4255 | struct ixgbe_fwd_adapter *accel) |
| 4256 | { | 4256 | { |
| 4257 | struct ixgbe_adapter *adapter = accel->real_adapter; | 4257 | struct ixgbe_adapter *adapter = accel->real_adapter; |
| 4258 | unsigned int rxbase = accel->rx_base_queue; | 4258 | unsigned int rxbase = accel->rx_base_queue; |
| @@ -7986,10 +7986,9 @@ skip_sriov: | |||
| 7986 | NETIF_F_TSO | | 7986 | NETIF_F_TSO | |
| 7987 | NETIF_F_TSO6 | | 7987 | NETIF_F_TSO6 | |
| 7988 | NETIF_F_RXHASH | | 7988 | NETIF_F_RXHASH | |
| 7989 | NETIF_F_RXCSUM | | 7989 | NETIF_F_RXCSUM; |
| 7990 | NETIF_F_HW_L2FW_DOFFLOAD; | ||
| 7991 | 7990 | ||
| 7992 | netdev->hw_features = netdev->features; | 7991 | netdev->hw_features = netdev->features | NETIF_F_HW_L2FW_DOFFLOAD; |
| 7993 | 7992 | ||
| 7994 | switch (adapter->hw.mac.type) { | 7993 | switch (adapter->hw.mac.type) { |
| 7995 | case ixgbe_mac_82599EB: | 7994 | case ixgbe_mac_82599EB: |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c index e4c676006be9..39217e5ff7dc 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c | |||
| @@ -46,6 +46,7 @@ static bool ixgbe_get_i2c_data(u32 *i2cctl); | |||
| 46 | static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw); | 46 | static void ixgbe_i2c_bus_clear(struct ixgbe_hw *hw); |
| 47 | static enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id); | 47 | static enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id); |
| 48 | static s32 ixgbe_get_phy_id(struct ixgbe_hw *hw); | 48 | static s32 ixgbe_get_phy_id(struct ixgbe_hw *hw); |
| 49 | static s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw); | ||
| 49 | 50 | ||
| 50 | /** | 51 | /** |
| 51 | * ixgbe_identify_phy_generic - Get physical layer module | 52 | * ixgbe_identify_phy_generic - Get physical layer module |
| @@ -1164,7 +1165,7 @@ err_read_i2c_eeprom: | |||
| 1164 | * | 1165 | * |
| 1165 | * Searches for and identifies the QSFP module and assigns appropriate PHY type | 1166 | * Searches for and identifies the QSFP module and assigns appropriate PHY type |
| 1166 | **/ | 1167 | **/ |
| 1167 | s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw) | 1168 | static s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw) |
| 1168 | { | 1169 | { |
| 1169 | struct ixgbe_adapter *adapter = hw->back; | 1170 | struct ixgbe_adapter *adapter = hw->back; |
| 1170 | s32 status = IXGBE_ERR_PHY_ADDR_INVALID; | 1171 | s32 status = IXGBE_ERR_PHY_ADDR_INVALID; |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h index aae900a256da..fffcbdd2bf0e 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.h | |||
| @@ -145,7 +145,6 @@ s32 ixgbe_get_phy_firmware_version_generic(struct ixgbe_hw *hw, | |||
| 145 | s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw); | 145 | s32 ixgbe_reset_phy_nl(struct ixgbe_hw *hw); |
| 146 | s32 ixgbe_identify_module_generic(struct ixgbe_hw *hw); | 146 | s32 ixgbe_identify_module_generic(struct ixgbe_hw *hw); |
| 147 | s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw); | 147 | s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw); |
| 148 | s32 ixgbe_identify_qsfp_module_generic(struct ixgbe_hw *hw); | ||
| 149 | s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, | 148 | s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw, |
| 150 | u16 *list_offset, | 149 | u16 *list_offset, |
| 151 | u16 *data_offset); | 150 | u16 *data_offset); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index d6f0c0d8cf11..72084f70adbb 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | |||
| @@ -291,7 +291,9 @@ static int ixgbe_pci_sriov_disable(struct pci_dev *dev) | |||
| 291 | { | 291 | { |
| 292 | struct ixgbe_adapter *adapter = pci_get_drvdata(dev); | 292 | struct ixgbe_adapter *adapter = pci_get_drvdata(dev); |
| 293 | int err; | 293 | int err; |
| 294 | #ifdef CONFIG_PCI_IOV | ||
| 294 | u32 current_flags = adapter->flags; | 295 | u32 current_flags = adapter->flags; |
| 296 | #endif | ||
| 295 | 297 | ||
| 296 | err = ixgbe_disable_sriov(adapter); | 298 | err = ixgbe_disable_sriov(adapter); |
| 297 | 299 | ||
