i40e: warn at the right time
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 31 Mar 2015 07:45:02 +0000 (00:45 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 Apr 2015 10:54:30 +0000 (03:54 -0700)
The call to pci_disable_sriov got moved, but the message about not
disabling VFs didn't move. So move it. While we're at, reword the
message a bit to make it more consistent with other driver messages.

Change-ID: I17d3e15e4fcfd5c9431a96ecb0117d728d3da18b
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

index bb184122f563e3ce4bb7a52e3053242365a18c70..184b00390f570984b805473fca79c135d9058131 100644 (file)
@@ -734,6 +734,8 @@ void i40e_free_vfs(struct i40e_pf *pf)
         */
        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");
 
        msleep(20); /* let any messages in transit get finished up */
 
@@ -763,9 +765,6 @@ void i40e_free_vfs(struct i40e_pf *pf)
                        bit_idx = (hw->func_caps.vf_base_id + vf_id) % 32;
                        wr32(hw, I40E_GLGEN_VFLRSTAT(reg_idx), (1 << bit_idx));
                }
-       } else {
-               dev_warn(&pf->pdev->dev,
-                        "unable to disable SR-IOV because VFs are assigned.\n");
        }
        clear_bit(__I40E_VF_DISABLE, &pf->state);
 }
This page took 0.028478 seconds and 5 git commands to generate.