Browse Source

igb: don't allow SR-IOV without MSI-X

MSI-X interrupts are required for SR-IOV operation. Check to make sure
they're enabled before allowing the user to turn on VFs.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Mitch A Williams 12 years ago
parent
commit
5026719674
1 changed files with 5 additions and 0 deletions
  1. 5 0
      drivers/net/ethernet/intel/igb/igb_main.c

+ 5 - 0
drivers/net/ethernet/intel/igb/igb_main.c

@@ -2436,6 +2436,11 @@ static int igb_enable_sriov(struct pci_dev *pdev, int num_vfs)
 	int err = 0;
 	int i;
 
+	if (!adapter->msix_entries) {
+		err = -EPERM;
+		goto out;
+	}
+
 	if (!num_vfs)
 		goto out;
 	else if (old_vfs && old_vfs == num_vfs)