summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2016-02-17 16:12:23 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-02-19 00:08:55 -0800
commit35f3472a750b3549f7f914ed96f41f0c2ca284f3 (patch)
tree23d87946f2700f2ca5b0d2d24ec56ecd18d1167c
parenta4618ec88de95a86f290d01c74c506552f1a5d95 (diff)
downloadop-kernel-dev-35f3472a750b3549f7f914ed96f41f0c2ca284f3.zip
op-kernel-dev-35f3472a750b3549f7f914ed96f41f0c2ca284f3.tar.gz
i40e: let go of the past
If we reset a VF, its VSI goes away, and it gets a new one. So don't hang on to the now-stale local VSI pointer. It just leads to suffering and kernel panics. Change-ID: Ia8823b4e85893e95e963acee284968022b29177a Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 93d8d98..acd2693 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2203,6 +2203,8 @@ int i40e_ndo_set_vf_port_vlan(struct net_device *netdev,
* and then reloading the VF driver.
*/
i40e_vc_disable_vf(pf, vf);
+ /* During reset the VF got a new VSI, so refresh the pointer. */
+ vsi = pf->vsi[vf->lan_vsi_idx];
}
/* Check for condition where there was already a port VLAN ID
OpenPOWER on IntegriCloud