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

Commit d5e51a10 authored by Alex Williamson's avatar Alex Williamson Committed by Jeff Kirsher
Browse files

igb: SR-IOV init reordering



igb is ineffective at setting a lower total VFs because:

int pci_sriov_set_totalvfs(struct pci_dev *dev, u16 numvfs)
{
        ...
        /* Shouldn't change if VFs already enabled */
        if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE)
                return -EBUSY;

Swap init ordering.

Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
Acked-by: default avatarGreg Rose <gregory.v.rose@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d0f63acc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2542,8 +2542,8 @@ static void igb_probe_vfs(struct igb_adapter *adapter)
	if ((hw->mac.type == e1000_i210) || (hw->mac.type == e1000_i211))
		return;

	igb_enable_sriov(pdev, max_vfs);
	pci_sriov_set_totalvfs(pdev, 7);
	igb_enable_sriov(pdev, max_vfs);

#endif /* CONFIG_PCI_IOV */
}