From d1ac1d2622e8f0fd2a25127a8649d135b54db8a9 Mon Sep 17 00:00:00 2001 From: Alexander Gordeev Date: Mon, 30 Dec 2013 08:28:13 +0100 Subject: 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 Signed-off-by: Bjorn Helgaas Reviewed-by: Tejun Heo --- include/linux/pci.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/pci.h') diff --git a/include/linux/pci.h b/include/linux/pci.h index 7c34c3913bc..6691de093f1 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); -- cgit v1.2.3-70-g09d2