]> Pileus Git - ~andy/linux/blobdiff - Documentation/PCI/MSI-HOWTO.txt
PCI/MSI: Add pci_msi_vec_count()
[~andy/linux] / Documentation / PCI / MSI-HOWTO.txt
index a4d174e954136ad077fa97e869bc3059420bebd3..a8b41788dfde0fbe06416b51ec20d87672038725 100644 (file)
@@ -169,6 +169,21 @@ on any interrupt for which it previously called request_irq().
 Failure to do so results in a BUG_ON(), leaving the device with
 MSI enabled and thus leaking its vector.
 
+4.2.5 pci_msi_vec_count
+
+int pci_msi_vec_count(struct pci_dev *dev)
+
+This function could be used to retrieve the number of MSI vectors the
+device requested (via the Multiple Message Capable register). The MSI
+specification only allows the returned value to be a power of two,
+up to a maximum of 2^5 (32).
+
+If this function returns a negative number, it indicates the device is
+not capable of sending MSIs.
+
+If this function returns a positive number, it indicates the maximum
+number of MSI interrupt vectors that could be allocated.
+
 4.3 Using MSI-X
 
 The MSI-X capability is much more flexible than the MSI capability.