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>
This commit is contained in:

committed by
Bjorn Helgaas

parent
52179dc9ed
commit
d1ac1d2622
@@ -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);
|
||||
|
Reference in New Issue
Block a user