Skip to content

Commit

Permalink
i40e: warn at the right time
Browse files Browse the repository at this point in the history
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 <[email protected]>
Tested-by: Jim Young <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
  • Loading branch information
mawilli1 authored and Jeff Kirsher committed Apr 3, 2015
1 parent b38da40 commit 6d7b967
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand 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);
}
Expand Down

0 comments on commit 6d7b967

Please sign in to comment.