]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
i40e: let go of the past
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 18 Feb 2016 00:12:23 +0000 (16:12 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:39:07 +0000 (08:39 -0800)
Orabug: 22342532

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>
(cherry picked from commit 35f3472a750b3549f7f914ed96f41f0c2ca284f3)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index 93d8d9849c0c9d976d12f8887e7918e0166afec7..acd2693a4e97d9747ea446d4c499dd44f00918cf 100644 (file)
@@ -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