i40e: reset VFs after PF reset
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 13 Feb 2014 11:48:46 +0000 (03:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 13 Feb 2014 22:27:29 +0000 (17:27 -0500)
Reset all of the VFs after a PF reset, so that they are in a known
state, and the VF driver can detect the reset and reinit itself.

Change-ID: I93c5b3a0f8b1371d0da078f92de948b9d3a6413f
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_main.c

index 8e444114bfc7e69c47328c31a23fcb5c7e0b4c2a..21d46f4bb214f60ba8fcb0112967457515e03035 100644 (file)
@@ -5332,6 +5332,11 @@ static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit)
        /* restart the VSIs that were rebuilt and running before the reset */
        i40e_pf_unquiesce_all_vsi(pf);
 
+       if (pf->num_alloc_vfs) {
+               for (v = 0; v < pf->num_alloc_vfs; v++)
+                       i40e_reset_vf(&pf->vf[v], true);
+       }
+
        /* tell the firmware that we're starting */
        dv.major_version = DRV_VERSION_MAJOR;
        dv.minor_version = DRV_VERSION_MINOR;