diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2013-12-30 08:28:13 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-04 01:17:55 +0100 |
commit | d1ac1d2622e8f0fd2a25127a8649d135b54db8a9 (patch) | |
tree | 9b267fa3c5d97fc9c6c65877a9d493d407258abe /include | |
parent | PCI/MSI: Make pci_enable_msi/msix() 'nvec' argument type as int (diff) | |
download | linux-d1ac1d2622e8f0fd2a25127a8649d135b54db8a9.tar.xz linux-d1ac1d2622e8f0fd2a25127a8649d135b54db8a9.zip |
PCI/MSI: Add pci_msi_vec_count()
Device drivers can use this interface to obtain the maximum number of MSI
interrupts the device supports and use that number, e.g., in a subsequent
call to pci_enable_msi_block().
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pci.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index 7c34c3913bcb..6691de093f1c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1154,6 +1154,11 @@ struct msix_entry { #ifndef CONFIG_PCI_MSI +static inline int pci_msi_vec_count(struct pci_dev *dev) +{ + return -ENOSYS; +} + static inline int pci_enable_msi_block(struct pci_dev *dev, int nvec) { return -ENOSYS; @@ -1195,6 +1200,7 @@ static inline int pci_msi_enabled(void) return 0; } #else +int pci_msi_vec_count(struct pci_dev *dev); int pci_enable_msi_block(struct pci_dev *dev, int nvec); int pci_enable_msi_block_auto(struct pci_dev *dev, int *maxvec); void pci_msi_shutdown(struct pci_dev *dev); |