mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
52179dc9ed
commit
d1ac1d2622
3 changed files with 54 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue