Skip to content

Commit 31ac910

Browse files
ethan.zhaodavem330
authored andcommitted
ixgbe: set driver_max_VFs should be done before enabling SRIOV
commit 43dc4e0 Limit number of reported VFs to device specific value It doesn't work and always returns -EBUSY because VFs are already enabled. ixgbe_enable_sriov() pci_enable_sriov() sriov_enable() { ... .. iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE; pci_cfg_access_lock(dev); ... ... } pci_sriov_set_totalvfs() { ... ... if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE) return -EBUSY; ... } So should set driver_max_VFs with pci_sriov_set_totalvfs() before enable VFs with ixgbe_enable_sriov(). V2: revised for net-next tree. Signed-off-by: Ethan Zhao <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Aaron Brown <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dcc23e3 commit 31ac910

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8019,8 +8019,8 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
80198019
/* Mailbox */
80208020
ixgbe_init_mbx_params_pf(hw);
80218021
memcpy(&hw->mbx.ops, ii->mbx_ops, sizeof(hw->mbx.ops));
8022-
ixgbe_enable_sriov(adapter);
80238022
pci_sriov_set_totalvfs(pdev, IXGBE_MAX_VFS_DRV_LIMIT);
8023+
ixgbe_enable_sriov(adapter);
80248024
skip_sriov:
80258025

80268026
#endif

0 commit comments

Comments
 (0)