}
 
        if (icr0 & I40E_PFINT_ICR0_VFLR_MASK) {
-               ena_mask &= ~I40E_PFINT_ICR0_ENA_VFLR_MASK;
-               set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
+               /* disable any further VFLR event notifications */
+               if (test_bit(__I40E_VF_RESETS_DISABLED, pf->state)) {
+                       u32 reg = rd32(hw, I40E_PFINT_ICR0_ENA);
+
+                       reg &= ~I40E_PFINT_ICR0_VFLR_MASK;
+                       wr32(hw, I40E_PFINT_ICR0_ENA, reg);
+               } else {
+                       ena_mask &= ~I40E_PFINT_ICR0_ENA_VFLR_MASK;
+                       set_bit(__I40E_VFLR_EVENT_PENDING, pf->state);
+               }
        }
 
        if (icr0 & I40E_PFINT_ICR0_GRST_MASK) {
        while (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state))
                usleep_range(1000, 2000);
 
+       if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
+               set_bit(__I40E_VF_RESETS_DISABLED, pf->state);
+               i40e_free_vfs(pf);
+               pf->flags &= ~I40E_FLAG_SRIOV_ENABLED;
+       }
        /* no more scheduling of any task */
        set_bit(__I40E_SUSPENDED, pf->state);
        set_bit(__I40E_DOWN, pf->state);
         */
        i40e_notify_client_of_netdev_close(pf->vsi[pf->lan_vsi], false);
 
-       if (pf->flags & I40E_FLAG_SRIOV_ENABLED) {
-               i40e_free_vfs(pf);
-               pf->flags &= ~I40E_FLAG_SRIOV_ENABLED;
-       }
-
        i40e_fdir_teardown(pf);
 
        /* If there is a switch structure or any orphans, remove them.
 
  * @vf: pointer to the VF structure
  * @flr: VFLR was issued or not
  *
- * Returns true if the VF is reset, false otherwise.
+ * Returns true if the VF is in reset, resets successfully, or resets
+ * are disabled and false otherwise.
  **/
 bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
 {
        u32 reg;
        int i;
 
+       if (test_bit(__I40E_VF_RESETS_DISABLED, pf->state))
+               return true;
+
        /* If the VFs have been disabled, this means something else is
         * resetting the VF, so we shouldn't continue.
         */
        if (test_and_set_bit(__I40E_VF_DISABLE, pf->state))
-               return false;
+               return true;
 
        i40e_trigger_vf_reset(vf, flr);
 
 
        i40e_notify_client_of_vf_enable(pf, 0);
 
+       /* Disable IOV before freeing resources. This lets any VF drivers
+        * running in the host get themselves cleaned up before we yank
+        * the carpet out from underneath their feet.
+        */
+       if (!pci_vfs_assigned(pf->pdev))
+               pci_disable_sriov(pf->pdev);
+       else
+               dev_warn(&pf->pdev->dev, "VFs are assigned - not disabling SR-IOV\n");
+
        /* Amortize wait time by stopping all VFs at the same time */
        for (i = 0; i < pf->num_alloc_vfs; i++) {
                if (test_bit(I40E_VF_STATE_INIT, &pf->vf[i].vf_states))
                i40e_vsi_wait_queues_disabled(pf->vsi[pf->vf[i].lan_vsi_idx]);
        }
 
-       /* Disable IOV before freeing resources. This lets any VF drivers
-        * running in the host get themselves cleaned up before we yank
-        * the carpet out from underneath their feet.
-        */
-       if (!pci_vfs_assigned(pf->pdev))
-               pci_disable_sriov(pf->pdev);
-       else
-               dev_warn(&pf->pdev->dev, "VFs are assigned - not disabling SR-IOV\n");
-
        /* free up VF resources */
        tmp = pf->num_alloc_vfs;
        pf->num_alloc_vfs = 0;