summaryrefslogtreecommitdiffstats
path: root/Documentation/PCI
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2013-12-30 08:28:13 +0100
committerBjorn Helgaas <bhelgaas@google.com>2014-01-03 17:17:55 -0700
commitd1ac1d2622e8f0fd2a25127a8649d135b54db8a9 (patch)
tree9b267fa3c5d97fc9c6c65877a9d493d407258abe /Documentation/PCI
parent52179dc9edc3b7a2b3bb01cbb1b6c96f6d05fc73 (diff)
downloadop-kernel-dev-d1ac1d2622e8f0fd2a25127a8649d135b54db8a9.zip
op-kernel-dev-d1ac1d2622e8f0fd2a25127a8649d135b54db8a9.tar.gz
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 'Documentation/PCI')
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt15
1 files changed, 15 insertions, 0 deletions
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index a4d174e..a8b4178 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -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.
OpenPOWER on IntegriCloud