Skip to contentSkip to conversation

ixgbe: Allow disabling VFs when they are pre-existing

PATCH Superseded Mark D Rustad 1 participant 1 message Apr 1, 2017

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ixgbe: Allow disabling VFs when they are pre-existing

Right now if VFs existing when the driver is loaded, it is not possible to destroy those VFs, even though messages from the driver suggest doing that when trying to change the number. This change permits the disabling of SR-IOV for the case when there are pre-existing VFs.

Testing-hints:

Change-type: DefectResolution
Title: ixgbe: Allow disabling VFs when they are pre-existing

---
 src/CORE/ixgbe_sriov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/CORE/ixgbe_sriov.c +1 -1
index 9b7d05110fe9..231acf274a70 100644
@@ -603,7 +603,7 @@ static int ixgbe_pci_sriov_disable(struct pci_dev *dev)
 	u32 current_flags = adapter->flags;
 #endif
 
-	if (adapter->num_vfs == 0)
+	if (!adapter->num_vfs && !pci_num_vf(dev))
 		return -EINVAL;
 
 	err = ixgbe_disable_sriov(adapter);