summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pcie
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2014-01-07 17:34:39 -0700
committerBjorn Helgaas <bhelgaas@google.com>2014-01-07 17:34:39 -0700
commit04f982beb900f37bc216d63c9dbc5bdddb4a3d3a (patch)
tree0138472ccdcc5143e67b6aa78c6c17ff9dcbf494 /drivers/pci/pcie
parentccb126545448136d36da8661f2941372554015d1 (diff)
parent302a2523c277bea0bbe8340312b09507905849ed (diff)
downloadop-kernel-dev-04f982beb900f37bc216d63c9dbc5bdddb4a3d3a.zip
op-kernel-dev-04f982beb900f37bc216d63c9dbc5bdddb4a3d3a.tar.gz
Merge branch 'pci/msi' into next
* pci/msi: PCI/MSI: Add pci_enable_msi_range() and pci_enable_msix_range() PCI/MSI: Add pci_msix_vec_count() PCI/MSI: Remove pci_enable_msi_block_auto() PCI/MSI: Add pci_msi_vec_count()
Diffstat (limited to 'drivers/pci/pcie')
-rw-r--r--drivers/pci/pcie/portdrv_core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/pcie/portdrv_core.c b/drivers/pci/pcie/portdrv_core.c
index 16a1ce4..986f8ea 100644
--- a/drivers/pci/pcie/portdrv_core.c
+++ b/drivers/pci/pcie/portdrv_core.c
@@ -79,9 +79,10 @@ static int pcie_port_enable_msix(struct pci_dev *dev, int *vectors, int mask)
u16 reg16;
u32 reg32;
- nr_entries = pci_msix_table_size(dev);
- if (!nr_entries)
- return -EINVAL;
+ nr_entries = pci_msix_vec_count(dev);
+ if (nr_entries < 0)
+ return nr_entries;
+ BUG_ON(!nr_entries);
if (nr_entries > PCIE_PORT_MAX_MSIX_ENTRIES)
nr_entries = PCIE_PORT_MAX_MSIX_ENTRIES;
OpenPOWER on IntegriCloud