aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-06-25 20:55:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-06-25 20:55:45 -0400
commit0b2fda896575f562c7cf297659fff2007984bec4 (patch)
tree1769df5b46b0410f4aed18a796571efb2dfc15de
parenta69f5edb8ba20c87c5f7c96ec40581f9f51f2910 (diff)
parent25941f94ba2dbb0b8e451a917aa12a547994c738 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2014-06-24 This series contains updates to i40e and i40evf. Greg provides a patch to stop the VF device after setting its MAC address. This is due to if the host VMM administrator has changed the VF device's MAC address then the i40e driver needs to halt the VF device so that the administrator will be forced to reload the VF driver so that the VF driver will start using the newly assigned MAC address. Shannon provides several patches for i40e, first makes prep_for_test() a void function since the return value was being ignored for the most part by all its callers. Adds a log warning when the firmware's API minor/major number is not what we expect to assist the user by informing them they may need to update their NVM or SW. Cleans up a stray print message so that it is similar to other print messages. Ensures to set the WoL flag when setting LAA and allow the user to set LAA again. So do not short-circuit the LAA assignment when the driver thinks it has already been done as it is possible that the user might want to force the address setting again. Provides a couple more LAA fixes to ensure the LAA gets restored after resets. Neerav provides a patch for i40e to add a PF reset when a malicious driver event for the PF occurs. As per the specification when the PF driver receives a malicious driver event the queue that caused the event is already stopped and it is expected that the function that owns the queue will reset the queue, but in some cases it may not be possible to determine the queue, so it is suggested to reset the whole function. Carolyn fixes ethtool coalesce settings to allow 0 as a disable value and adds message to user about invalid values. Jesse removes a reserved type which was not removed from the code. Catherine provides a patch to add the ability to enable/disable link from set_link)restart_an() which will make it easy to toggle link without calling set_phy_config() when no other link settings need to change. Anjali provides a patch to ensure we do a PF reset on Tx hang and that way we avoid any Malicious Driver Detect (MDD) events because of a Tx queue disable failure. v2: - fixed the un-needed return in patch 2 based on feedback from Sergei Shtylyov - added punctuation to print statements and code comment based on feedback from Sergei Shtylyov ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e.h2
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_common.c8
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_ethtool.c31
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_main.c125
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_prototype.h3
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_txrx.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_type.h1
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c2
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_txrx.h1
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_type.h1
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c2
11 files changed, 128 insertions, 49 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e.h b/drivers/net/ethernet/intel/i40e/i40e.h
index 817e179dc3f9..2ec6e8a11ee1 100644
--- a/drivers/net/ethernet/intel/i40e/i40e.h
+++ b/drivers/net/ethernet/intel/i40e/i40e.h
@@ -362,6 +362,7 @@ struct i40e_mac_filter {
362 bool is_vf; /* filter belongs to a VF */ 362 bool is_vf; /* filter belongs to a VF */
363 bool is_netdev; /* filter belongs to a netdev */ 363 bool is_netdev; /* filter belongs to a netdev */
364 bool changed; /* filter needs to be sync'd to the HW */ 364 bool changed; /* filter needs to be sync'd to the HW */
365 bool is_laa; /* filter is a Locally Administered Address */
365}; 366};
366 367
367struct i40e_veb { 368struct i40e_veb {
@@ -617,6 +618,7 @@ static inline void i40e_dbg_init(void) {}
617static inline void i40e_dbg_exit(void) {} 618static inline void i40e_dbg_exit(void) {}
618#endif /* CONFIG_DEBUG_FS*/ 619#endif /* CONFIG_DEBUG_FS*/
619void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector); 620void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector);
621void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector);
620void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf); 622void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf);
621void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf); 623void i40e_irq_dynamic_enable_icr0(struct i40e_pf *pf);
622int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd); 624int i40e_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c
index a51bba634718..bbace40bd114 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_common.c
@@ -971,12 +971,14 @@ i40e_status i40e_aq_clear_pxe_mode(struct i40e_hw *hw,
971/** 971/**
972 * i40e_aq_set_link_restart_an 972 * i40e_aq_set_link_restart_an
973 * @hw: pointer to the hw struct 973 * @hw: pointer to the hw struct
974 * @enable_link: if true: enable link, if false: disable link
974 * @cmd_details: pointer to command details structure or NULL 975 * @cmd_details: pointer to command details structure or NULL
975 * 976 *
976 * Sets up the link and restarts the Auto-Negotiation over the link. 977 * Sets up the link and restarts the Auto-Negotiation over the link.
977 **/ 978 **/
978i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw, 979i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
979 struct i40e_asq_cmd_details *cmd_details) 980 bool enable_link,
981 struct i40e_asq_cmd_details *cmd_details)
980{ 982{
981 struct i40e_aq_desc desc; 983 struct i40e_aq_desc desc;
982 struct i40e_aqc_set_link_restart_an *cmd = 984 struct i40e_aqc_set_link_restart_an *cmd =
@@ -987,6 +989,10 @@ i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
987 i40e_aqc_opc_set_link_restart_an); 989 i40e_aqc_opc_set_link_restart_an);
988 990
989 cmd->command = I40E_AQ_PHY_RESTART_AN; 991 cmd->command = I40E_AQ_PHY_RESTART_AN;
992 if (enable_link)
993 cmd->command |= I40E_AQ_PHY_LINK_ENABLE;
994 else
995 cmd->command &= ~I40E_AQ_PHY_LINK_ENABLE;
990 996
991 status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); 997 status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
992 998
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 4a488ffcd6b0..df89b6c3db41 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -1027,9 +1027,10 @@ static int i40e_nway_reset(struct net_device *netdev)
1027 struct i40e_netdev_priv *np = netdev_priv(netdev); 1027 struct i40e_netdev_priv *np = netdev_priv(netdev);
1028 struct i40e_pf *pf = np->vsi->back; 1028 struct i40e_pf *pf = np->vsi->back;
1029 struct i40e_hw *hw = &pf->hw; 1029 struct i40e_hw *hw = &pf->hw;
1030 bool link_up = hw->phy.link_info.link_info & I40E_AQ_LINK_UP;
1030 i40e_status ret = 0; 1031 i40e_status ret = 0;
1031 1032
1032 ret = i40e_aq_set_link_restart_an(hw, NULL); 1033 ret = i40e_aq_set_link_restart_an(hw, link_up, NULL);
1033 if (ret) { 1034 if (ret) {
1034 netdev_info(netdev, "link restart failed, aq_err=%d\n", 1035 netdev_info(netdev, "link restart failed, aq_err=%d\n",
1035 pf->hw.aq.asq_last_status); 1036 pf->hw.aq.asq_last_status);
@@ -1105,17 +1106,36 @@ static int i40e_set_coalesce(struct net_device *netdev,
1105 if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq) 1106 if (ec->tx_max_coalesced_frames_irq || ec->rx_max_coalesced_frames_irq)
1106 vsi->work_limit = ec->tx_max_coalesced_frames_irq; 1107 vsi->work_limit = ec->tx_max_coalesced_frames_irq;
1107 1108
1109 vector = vsi->base_vector;
1108 if ((ec->rx_coalesce_usecs >= (I40E_MIN_ITR << 1)) && 1110 if ((ec->rx_coalesce_usecs >= (I40E_MIN_ITR << 1)) &&
1109 (ec->rx_coalesce_usecs <= (I40E_MAX_ITR << 1))) 1111 (ec->rx_coalesce_usecs <= (I40E_MAX_ITR << 1))) {
1110 vsi->rx_itr_setting = ec->rx_coalesce_usecs; 1112 vsi->rx_itr_setting = ec->rx_coalesce_usecs;
1111 else 1113 } else if (ec->rx_coalesce_usecs == 0) {
1114 vsi->rx_itr_setting = ec->rx_coalesce_usecs;
1115 i40e_irq_dynamic_disable(vsi, vector);
1116 if (ec->use_adaptive_rx_coalesce)
1117 netif_info(pf, drv, netdev,
1118 "Rx-secs=0, need to disable adaptive-Rx for a complete disable\n");
1119 } else {
1120 netif_info(pf, drv, netdev,
1121 "Invalid value, Rx-usecs range is 0, 8-8160\n");
1112 return -EINVAL; 1122 return -EINVAL;
1123 }
1113 1124
1114 if ((ec->tx_coalesce_usecs >= (I40E_MIN_ITR << 1)) && 1125 if ((ec->tx_coalesce_usecs >= (I40E_MIN_ITR << 1)) &&
1115 (ec->tx_coalesce_usecs <= (I40E_MAX_ITR << 1))) 1126 (ec->tx_coalesce_usecs <= (I40E_MAX_ITR << 1))) {
1116 vsi->tx_itr_setting = ec->tx_coalesce_usecs; 1127 vsi->tx_itr_setting = ec->tx_coalesce_usecs;
1117 else 1128 } else if (ec->tx_coalesce_usecs == 0) {
1129 vsi->tx_itr_setting = ec->tx_coalesce_usecs;
1130 i40e_irq_dynamic_disable(vsi, vector);
1131 if (ec->use_adaptive_tx_coalesce)
1132 netif_info(pf, drv, netdev,
1133 "Tx-secs=0, need to disable adaptive-Tx for a complete disable\n");
1134 } else {
1135 netif_info(pf, drv, netdev,
1136 "Invalid value, Tx-usecs range is 0, 8-8160\n");
1118 return -EINVAL; 1137 return -EINVAL;
1138 }
1119 1139
1120 if (ec->use_adaptive_rx_coalesce) 1140 if (ec->use_adaptive_rx_coalesce)
1121 vsi->rx_itr_setting |= I40E_ITR_DYNAMIC; 1141 vsi->rx_itr_setting |= I40E_ITR_DYNAMIC;
@@ -1127,7 +1147,6 @@ static int i40e_set_coalesce(struct net_device *netdev,
1127 else 1147 else
1128 vsi->tx_itr_setting &= ~I40E_ITR_DYNAMIC; 1148 vsi->tx_itr_setting &= ~I40E_ITR_DYNAMIC;
1129 1149
1130 vector = vsi->base_vector;
1131 for (i = 0; i < vsi->num_q_vectors; i++, vector++) { 1150 for (i = 0; i < vsi->num_q_vectors; i++, vector++) {
1132 q_vector = vsi->q_vectors[i]; 1151 q_vector = vsi->q_vectors[i];
1133 q_vector->rx.itr = ITR_TO_REG(vsi->rx_itr_setting); 1152 q_vector->rx.itr = ITR_TO_REG(vsi->rx_itr_setting);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b167fc2c4abe..5980d6b3fb1a 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -39,7 +39,7 @@ static const char i40e_driver_string[] =
39 39
40#define DRV_VERSION_MAJOR 0 40#define DRV_VERSION_MAJOR 0
41#define DRV_VERSION_MINOR 4 41#define DRV_VERSION_MINOR 4
42#define DRV_VERSION_BUILD 13 42#define DRV_VERSION_BUILD 17
43#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \ 43#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
44 __stringify(DRV_VERSION_MINOR) "." \ 44 __stringify(DRV_VERSION_MINOR) "." \
45 __stringify(DRV_VERSION_BUILD) DRV_KERN 45 __stringify(DRV_VERSION_BUILD) DRV_KERN
@@ -278,7 +278,7 @@ static void i40e_tx_timeout(struct net_device *netdev)
278 pf->tx_timeout_count++; 278 pf->tx_timeout_count++;
279 279
280 if (time_after(jiffies, (pf->tx_timeout_last_recovery + HZ*20))) 280 if (time_after(jiffies, (pf->tx_timeout_last_recovery + HZ*20)))
281 pf->tx_timeout_recovery_level = 0; 281 pf->tx_timeout_recovery_level = 1;
282 pf->tx_timeout_last_recovery = jiffies; 282 pf->tx_timeout_last_recovery = jiffies;
283 netdev_info(netdev, "tx_timeout recovery level %d\n", 283 netdev_info(netdev, "tx_timeout recovery level %d\n",
284 pf->tx_timeout_recovery_level); 284 pf->tx_timeout_recovery_level);
@@ -1327,9 +1327,6 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
1327 1327
1328 netdev_info(netdev, "set mac address=%pM\n", addr->sa_data); 1328 netdev_info(netdev, "set mac address=%pM\n", addr->sa_data);
1329 1329
1330 if (ether_addr_equal(netdev->dev_addr, addr->sa_data))
1331 return 0;
1332
1333 if (test_bit(__I40E_DOWN, &vsi->back->state) || 1330 if (test_bit(__I40E_DOWN, &vsi->back->state) ||
1334 test_bit(__I40E_RESET_RECOVERY_PENDING, &vsi->back->state)) 1331 test_bit(__I40E_RESET_RECOVERY_PENDING, &vsi->back->state))
1335 return -EADDRNOTAVAIL; 1332 return -EADDRNOTAVAIL;
@@ -1337,7 +1334,7 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
1337 if (vsi->type == I40E_VSI_MAIN) { 1334 if (vsi->type == I40E_VSI_MAIN) {
1338 i40e_status ret; 1335 i40e_status ret;
1339 ret = i40e_aq_mac_address_write(&vsi->back->hw, 1336 ret = i40e_aq_mac_address_write(&vsi->back->hw,
1340 I40E_AQC_WRITE_TYPE_LAA_ONLY, 1337 I40E_AQC_WRITE_TYPE_LAA_WOL,
1341 addr->sa_data, NULL); 1338 addr->sa_data, NULL);
1342 if (ret) { 1339 if (ret) {
1343 netdev_info(netdev, 1340 netdev_info(netdev,
@@ -1345,22 +1342,27 @@ static int i40e_set_mac(struct net_device *netdev, void *p)
1345 ret); 1342 ret);
1346 return -EADDRNOTAVAIL; 1343 return -EADDRNOTAVAIL;
1347 } 1344 }
1348
1349 ether_addr_copy(vsi->back->hw.mac.addr, addr->sa_data);
1350 } 1345 }
1351 1346
1352 /* In order to be sure to not drop any packets, add the new address 1347 f = i40e_find_mac(vsi, addr->sa_data, false, true);
1353 * then delete the old one. 1348 if (!f) {
1354 */ 1349 /* In order to be sure to not drop any packets, add the
1355 f = i40e_add_filter(vsi, addr->sa_data, I40E_VLAN_ANY, false, false); 1350 * new address first then delete the old one.
1356 if (!f) 1351 */
1357 return -ENOMEM; 1352 f = i40e_add_filter(vsi, addr->sa_data, I40E_VLAN_ANY,
1353 false, false);
1354 if (!f)
1355 return -ENOMEM;
1358 1356
1359 i40e_sync_vsi_filters(vsi); 1357 i40e_sync_vsi_filters(vsi);
1360 i40e_del_filter(vsi, netdev->dev_addr, I40E_VLAN_ANY, false, false); 1358 i40e_del_filter(vsi, netdev->dev_addr, I40E_VLAN_ANY,
1361 i40e_sync_vsi_filters(vsi); 1359 false, false);
1360 i40e_sync_vsi_filters(vsi);
1361 }
1362 1362
1363 ether_addr_copy(netdev->dev_addr, addr->sa_data); 1363 f->is_laa = true;
1364 if (!ether_addr_equal(netdev->dev_addr, addr->sa_data))
1365 ether_addr_copy(netdev->dev_addr, addr->sa_data);
1364 1366
1365 return 0; 1367 return 0;
1366} 1368}
@@ -2768,6 +2770,22 @@ void i40e_irq_dynamic_enable(struct i40e_vsi *vsi, int vector)
2768} 2770}
2769 2771
2770/** 2772/**
2773 * i40e_irq_dynamic_disable - Disable default interrupt generation settings
2774 * @vsi: pointer to a vsi
2775 * @vector: enable a particular Hw Interrupt vector
2776 **/
2777void i40e_irq_dynamic_disable(struct i40e_vsi *vsi, int vector)
2778{
2779 struct i40e_pf *pf = vsi->back;
2780 struct i40e_hw *hw = &pf->hw;
2781 u32 val;
2782
2783 val = I40E_ITR_NONE << I40E_PFINT_DYN_CTLN_ITR_INDX_SHIFT;
2784 wr32(hw, I40E_PFINT_DYN_CTLN(vector - 1), val);
2785 i40e_flush(hw);
2786}
2787
2788/**
2771 * i40e_msix_clean_rings - MSIX mode Interrupt Handler 2789 * i40e_msix_clean_rings - MSIX mode Interrupt Handler
2772 * @irq: interrupt number 2790 * @irq: interrupt number
2773 * @data: pointer to a q_vector 2791 * @data: pointer to a q_vector
@@ -5611,7 +5629,7 @@ static void i40e_fdir_teardown(struct i40e_pf *pf)
5611 * 5629 *
5612 * Close up the VFs and other things in prep for pf Reset. 5630 * Close up the VFs and other things in prep for pf Reset.
5613 **/ 5631 **/
5614static int i40e_prep_for_reset(struct i40e_pf *pf) 5632static void i40e_prep_for_reset(struct i40e_pf *pf)
5615{ 5633{
5616 struct i40e_hw *hw = &pf->hw; 5634 struct i40e_hw *hw = &pf->hw;
5617 i40e_status ret = 0; 5635 i40e_status ret = 0;
@@ -5619,7 +5637,7 @@ static int i40e_prep_for_reset(struct i40e_pf *pf)
5619 5637
5620 clear_bit(__I40E_RESET_INTR_RECEIVED, &pf->state); 5638 clear_bit(__I40E_RESET_INTR_RECEIVED, &pf->state);
5621 if (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state)) 5639 if (test_and_set_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state))
5622 return 0; 5640 return;
5623 5641
5624 dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n"); 5642 dev_dbg(&pf->pdev->dev, "Tearing down internal switch for reset\n");
5625 5643
@@ -5636,13 +5654,10 @@ static int i40e_prep_for_reset(struct i40e_pf *pf)
5636 /* call shutdown HMC */ 5654 /* call shutdown HMC */
5637 if (hw->hmc.hmc_obj) { 5655 if (hw->hmc.hmc_obj) {
5638 ret = i40e_shutdown_lan_hmc(hw); 5656 ret = i40e_shutdown_lan_hmc(hw);
5639 if (ret) { 5657 if (ret)
5640 dev_warn(&pf->pdev->dev, 5658 dev_warn(&pf->pdev->dev,
5641 "shutdown_lan_hmc failed: %d\n", ret); 5659 "shutdown_lan_hmc failed: %d\n", ret);
5642 clear_bit(__I40E_RESET_RECOVERY_PENDING, &pf->state);
5643 }
5644 } 5660 }
5645 return ret;
5646} 5661}
5647 5662
5648/** 5663/**
@@ -5778,7 +5793,7 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
5778 } 5793 }
5779 5794
5780 if (pf->vsi[pf->lan_vsi]->uplink_seid == pf->mac_seid) { 5795 if (pf->vsi[pf->lan_vsi]->uplink_seid == pf->mac_seid) {
5781 dev_info(&pf->pdev->dev, "attempting to rebuild PF VSI\n"); 5796 dev_dbg(&pf->pdev->dev, "attempting to rebuild PF VSI\n");
5782 /* no VEB, so rebuild only the Main VSI */ 5797 /* no VEB, so rebuild only the Main VSI */
5783 ret = i40e_add_vsi(pf->vsi[pf->lan_vsi]); 5798 ret = i40e_add_vsi(pf->vsi[pf->lan_vsi]);
5784 if (ret) { 5799 if (ret) {
@@ -5816,11 +5831,8 @@ end_core_reset:
5816 **/ 5831 **/
5817static void i40e_handle_reset_warning(struct i40e_pf *pf) 5832static void i40e_handle_reset_warning(struct i40e_pf *pf)
5818{ 5833{
5819 i40e_status ret; 5834 i40e_prep_for_reset(pf);
5820 5835 i40e_reset_and_rebuild(pf, false);
5821 ret = i40e_prep_for_reset(pf);
5822 if (!ret)
5823 i40e_reset_and_rebuild(pf, false);
5824} 5836}
5825 5837
5826/** 5838/**
@@ -5833,6 +5845,7 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
5833{ 5845{
5834 struct i40e_hw *hw = &pf->hw; 5846 struct i40e_hw *hw = &pf->hw;
5835 bool mdd_detected = false; 5847 bool mdd_detected = false;
5848 bool pf_mdd_detected = false;
5836 struct i40e_vf *vf; 5849 struct i40e_vf *vf;
5837 u32 reg; 5850 u32 reg;
5838 int i; 5851 int i;
@@ -5872,6 +5885,30 @@ static void i40e_handle_mdd_event(struct i40e_pf *pf)
5872 mdd_detected = true; 5885 mdd_detected = true;
5873 } 5886 }
5874 5887
5888 if (mdd_detected) {
5889 reg = rd32(hw, I40E_PF_MDET_TX);
5890 if (reg & I40E_PF_MDET_TX_VALID_MASK) {
5891 wr32(hw, I40E_PF_MDET_TX, 0xFFFF);
5892 dev_info(&pf->pdev->dev,
5893 "MDD TX event is for this function 0x%08x, requesting PF reset.\n",
5894 reg);
5895 pf_mdd_detected = true;
5896 }
5897 reg = rd32(hw, I40E_PF_MDET_RX);
5898 if (reg & I40E_PF_MDET_RX_VALID_MASK) {
5899 wr32(hw, I40E_PF_MDET_RX, 0xFFFF);
5900 dev_info(&pf->pdev->dev,
5901 "MDD RX event is for this function 0x%08x, requesting PF reset.\n",
5902 reg);
5903 pf_mdd_detected = true;
5904 }
5905 /* Queue belongs to the PF, initiate a reset */
5906 if (pf_mdd_detected) {
5907 set_bit(__I40E_PF_RESET_REQUESTED, &pf->state);
5908 i40e_service_event_schedule(pf);
5909 }
5910 }
5911
5875 /* see if one of the VFs needs its hand slapped */ 5912 /* see if one of the VFs needs its hand slapped */
5876 for (i = 0; i < pf->num_alloc_vfs && mdd_detected; i++) { 5913 for (i = 0; i < pf->num_alloc_vfs && mdd_detected; i++) {
5877 vf = &(pf->vf[i]); 5914 vf = &(pf->vf[i]);
@@ -6789,6 +6826,8 @@ static int i40e_sw_init(struct i40e_pf *pf)
6789 pf->irq_pile->num_entries = pf->hw.func_caps.num_msix_vectors; 6826 pf->irq_pile->num_entries = pf->hw.func_caps.num_msix_vectors;
6790 pf->irq_pile->search_hint = 0; 6827 pf->irq_pile->search_hint = 0;
6791 6828
6829 pf->tx_timeout_recovery_level = 1;
6830
6792 mutex_init(&pf->switch_mutex); 6831 mutex_init(&pf->switch_mutex);
6793 6832
6794sw_init_done: 6833sw_init_done:
@@ -7342,6 +7381,12 @@ static int i40e_add_vsi(struct i40e_vsi *vsi)
7342 list_for_each_entry_safe(f, ftmp, &vsi->mac_filter_list, list) { 7381 list_for_each_entry_safe(f, ftmp, &vsi->mac_filter_list, list) {
7343 f->changed = true; 7382 f->changed = true;
7344 f_count++; 7383 f_count++;
7384
7385 if (f->is_laa && vsi->type == I40E_VSI_MAIN) {
7386 i40e_aq_mac_address_write(&vsi->back->hw,
7387 I40E_AQC_WRITE_TYPE_LAA_WOL,
7388 f->macaddr, NULL);
7389 }
7345 } 7390 }
7346 if (f_count) { 7391 if (f_count) {
7347 vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED; 7392 vsi->flags |= I40E_VSI_FLAG_FILTER_CHANGED;
@@ -8614,6 +8659,20 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
8614 goto err_pf_reset; 8659 goto err_pf_reset;
8615 } 8660 }
8616 8661
8662 if (hw->aq.api_min_ver > I40E_FW_API_VERSION_MINOR)
8663 dev_info(&pdev->dev,
8664 "Note: FW API version %02x.%02x newer than expected %02x.%02x, recommend driver update.\n",
8665 hw->aq.api_maj_ver, hw->aq.api_min_ver,
8666 I40E_FW_API_VERSION_MAJOR, I40E_FW_API_VERSION_MINOR);
8667
8668 if (hw->aq.api_maj_ver < I40E_FW_API_VERSION_MAJOR ||
8669 hw->aq.api_min_ver < (I40E_FW_API_VERSION_MINOR-1))
8670 dev_info(&pdev->dev,
8671 "Note: FW API version %02x.%02x older than expected %02x.%02x, recommend nvm update.\n",
8672 hw->aq.api_maj_ver, hw->aq.api_min_ver,
8673 I40E_FW_API_VERSION_MAJOR, I40E_FW_API_VERSION_MINOR);
8674
8675
8617 i40e_verify_eeprom(pf); 8676 i40e_verify_eeprom(pf);
8618 8677
8619 /* Rev 0 hardware was never productized */ 8678 /* Rev 0 hardware was never productized */
@@ -8841,7 +8900,6 @@ static void i40e_remove(struct pci_dev *pdev)
8841{ 8900{
8842 struct i40e_pf *pf = pci_get_drvdata(pdev); 8901 struct i40e_pf *pf = pci_get_drvdata(pdev);
8843 i40e_status ret_code; 8902 i40e_status ret_code;
8844 u32 reg;
8845 int i; 8903 int i;
8846 8904
8847 i40e_dbg_pf_exit(pf); 8905 i40e_dbg_pf_exit(pf);
@@ -8919,11 +8977,6 @@ static void i40e_remove(struct pci_dev *pdev)
8919 kfree(pf->irq_pile); 8977 kfree(pf->irq_pile);
8920 kfree(pf->vsi); 8978 kfree(pf->vsi);
8921 8979
8922 /* force a PF reset to clean anything leftover */
8923 reg = rd32(&pf->hw, I40E_PFGEN_CTRL);
8924 wr32(&pf->hw, I40E_PFGEN_CTRL, (reg | I40E_PFGEN_CTRL_PFSWR_MASK));
8925 i40e_flush(&pf->hw);
8926
8927 iounmap(pf->hw.hw_addr); 8980 iounmap(pf->hw.hw_addr);
8928 kfree(pf); 8981 kfree(pf);
8929 pci_release_selected_regions(pdev, 8982 pci_release_selected_regions(pdev,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_prototype.h b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
index a430699c41d5..3300b996a467 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_prototype.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_prototype.h
@@ -77,7 +77,8 @@ i40e_status i40e_aq_set_default_vsi(struct i40e_hw *hw, u16 vsi_id,
77i40e_status i40e_aq_clear_pxe_mode(struct i40e_hw *hw, 77i40e_status i40e_aq_clear_pxe_mode(struct i40e_hw *hw,
78 struct i40e_asq_cmd_details *cmd_details); 78 struct i40e_asq_cmd_details *cmd_details);
79i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw, 79i40e_status i40e_aq_set_link_restart_an(struct i40e_hw *hw,
80 struct i40e_asq_cmd_details *cmd_details); 80 bool enable_link,
81 struct i40e_asq_cmd_details *cmd_details);
81i40e_status i40e_aq_get_link_info(struct i40e_hw *hw, 82i40e_status i40e_aq_get_link_info(struct i40e_hw *hw,
82 bool enable_lse, struct i40e_link_status *link, 83 bool enable_lse, struct i40e_link_status *link,
83 struct i40e_asq_cmd_details *cmd_details); 84 struct i40e_asq_cmd_details *cmd_details);
diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.h b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
index 0277894fe1c4..f09fb3ef691d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.h
@@ -75,7 +75,6 @@ enum i40e_dyn_idx_t {
75 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \ 75 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
76 ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4) | \ 76 ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4) | \
77 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \ 77 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \
78 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN) | \
79 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \ 78 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \
80 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \ 79 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
81 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \ 80 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
diff --git a/drivers/net/ethernet/intel/i40e/i40e_type.h b/drivers/net/ethernet/intel/i40e/i40e_type.h
index 1c0d5a70b892..11dd2dcfb592 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_type.h
@@ -878,7 +878,6 @@ enum i40e_filter_pctype {
878 I40E_FILTER_PCTYPE_FRAG_IPV4 = 36, 878 I40E_FILTER_PCTYPE_FRAG_IPV4 = 36,
879 /* Note: Values 37-40 are reserved for future use */ 879 /* Note: Values 37-40 are reserved for future use */
880 I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41, 880 I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
881 I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN = 42,
882 I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43, 881 I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
883 I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44, 882 I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
884 I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45, 883 I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index f5b9d2062573..d2dabae5b40c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2077,6 +2077,8 @@ int i40e_ndo_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)
2077 } 2077 }
2078 ether_addr_copy(vf->default_lan_addr.addr, mac); 2078 ether_addr_copy(vf->default_lan_addr.addr, mac);
2079 vf->pf_set_mac = true; 2079 vf->pf_set_mac = true;
2080 /* Force the VF driver stop so it has to reload with new MAC address */
2081 i40e_vc_disable_vf(pf, vf);
2080 dev_info(&pf->pdev->dev, "Reload the VF driver to make this change effective.\n"); 2082 dev_info(&pf->pdev->dev, "Reload the VF driver to make this change effective.\n");
2081 ret = 0; 2083 ret = 0;
2082 2084
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
index 30d248bc5d19..acd3c12b8f6a 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_txrx.h
@@ -75,7 +75,6 @@ enum i40e_dyn_idx_t {
75 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \ 75 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV4_OTHER) | \
76 ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4) | \ 76 ((u64)1 << I40E_FILTER_PCTYPE_FRAG_IPV4) | \
77 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \ 77 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_UDP) | \
78 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN) | \
79 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \ 78 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_TCP) | \
80 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \ 79 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_SCTP) | \
81 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \ 80 ((u64)1 << I40E_FILTER_PCTYPE_NONF_IPV6_OTHER) | \
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_type.h b/drivers/net/ethernet/intel/i40evf/i40e_type.h
index 9c835786e8a1..23cd18b66b71 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_type.h
+++ b/drivers/net/ethernet/intel/i40evf/i40e_type.h
@@ -878,7 +878,6 @@ enum i40e_filter_pctype {
878 I40E_FILTER_PCTYPE_FRAG_IPV4 = 36, 878 I40E_FILTER_PCTYPE_FRAG_IPV4 = 36,
879 /* Note: Values 37-40 are reserved for future use */ 879 /* Note: Values 37-40 are reserved for future use */
880 I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41, 880 I40E_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
881 I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN = 42,
882 I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43, 881 I40E_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
883 I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44, 882 I40E_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
884 I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45, 883 I40E_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index 2fdccce1b872..b473172708f5 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -36,7 +36,7 @@ char i40evf_driver_name[] = "i40evf";
36static const char i40evf_driver_string[] = 36static const char i40evf_driver_string[] =
37 "Intel(R) XL710 X710 Virtual Function Network Driver"; 37 "Intel(R) XL710 X710 Virtual Function Network Driver";
38 38
39#define DRV_VERSION "0.9.35" 39#define DRV_VERSION "0.9.36"
40const char i40evf_driver_version[] = DRV_VERSION; 40const char i40evf_driver_version[] = DRV_VERSION;
41static const char i40evf_copyright[] = 41static const char i40evf_copyright[] =
42 "Copyright (c) 2013 - 2014 Intel Corporation."; 42 "Copyright (c) 2013 - 2014 Intel Corporation.";