summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2013-12-30 08:28:15 +0100
committerRichard Zhu <Richard.Zhu@freescale.com>2014-11-07 12:55:57 +0800
commit514617755ef5a179d001f9a233b934c3ff7339cb (patch)
tree470c590d9acbde345ec2904c1ca0f83bdf4e6744 /include
parent9464a0444d135beb152b638334c8d23f9b2626d2 (diff)
PCI/MSI: Add pci_msix_vec_count()
This creates an MSI-X counterpart for pci_msi_vec_count(). Device drivers can use this function to obtain maximum number of MSI-X interrupts the device supports and use that number in a subsequent call to pci_enable_msix(). pci_msix_vec_count() supersedes pci_msix_table_size() and returns a negative errno if device does not support MSI-X interrupts. After this update, callers must always check the returned value. The only user of pci_msix_table_size() was the PCI-Express port driver, which is also updated by this change. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Tejun Heo <tj@kernel.org> (cherry picked from commit ff1aa430a2fa43189e89c7ddd559f0bee2298288) (cherry picked from commit 033f2e78584cdd322c3a06cdf1a5641ca2f0ae3d)
Diffstat (limited to 'include')
-rw-r--r--include/linux/pci.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index f142480d9dc5..ba435a185355 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1135,9 +1135,9 @@ static inline void pci_msi_shutdown(struct pci_dev *dev)
static inline void pci_disable_msi(struct pci_dev *dev)
{ }
-static inline int pci_msix_table_size(struct pci_dev *dev)
+static inline int pci_msix_vec_count(struct pci_dev *dev)
{
- return 0;
+ return -ENOSYS;
}
static inline int pci_enable_msix(struct pci_dev *dev,
struct msix_entry *entries, int nvec)
@@ -1164,7 +1164,7 @@ int pci_msi_vec_count(struct pci_dev *dev);
int pci_enable_msi_block(struct pci_dev *dev, int nvec);
void pci_msi_shutdown(struct pci_dev *dev);
void pci_disable_msi(struct pci_dev *dev);
-int pci_msix_table_size(struct pci_dev *dev);
+int pci_msix_vec_count(struct pci_dev *dev);
int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec);
void pci_msix_shutdown(struct pci_dev *dev);
void pci_disable_msix(struct pci_dev *dev);