Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6d7b967d authored by Mitch Williams's avatar Mitch Williams Committed by Jeff Kirsher
Browse files

i40e: warn at the right time



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: default avatarMitch Williams <mitch.a.williams@intel.com>
Tested-by: default avatarJim Young <james.m.young@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent b38da401
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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);
}