diff options
author | Mitch A Williams <mitch.a.williams@intel.com> | 2013-06-20 06:03:36 (GMT) |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-08-22 09:25:44 (GMT) |
commit | 502671967403c611b362836aef8cdee65e9a626a (patch) | |
tree | 882a9eac560ff0c90d8c549e0b196811884d43c9 /drivers | |
parent | 7f90128e246ea9827dd5ac532e49611aaf001892 (diff) | |
download | linux-502671967403c611b362836aef8cdee65e9a626a.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 8e7c1b83..94295a0 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/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) |