aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/PCI
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2013-12-30 02:28:13 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-01-03 19:17:55 -0500
commitd1ac1d2622e8f0fd2a25127a8649d135b54db8a9 (patch)
tree9b267fa3c5d97fc9c6c65877a9d493d407258abe /Documentation/PCI
parent52179dc9edc3b7a2b3bb01cbb1b6c96f6d05fc73 (diff)
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 a4d174e95413..a8b41788dfde 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().
169Failure to do so results in a BUG_ON(), leaving the device with 169Failure to do so results in a BUG_ON(), leaving the device with
170MSI enabled and thus leaking its vector. 170MSI enabled and thus leaking its vector.
171 171
1724.2.5 pci_msi_vec_count
173
174int pci_msi_vec_count(struct pci_dev *dev)
175
176This function could be used to retrieve the number of MSI vectors the
177device requested (via the Multiple Message Capable register). The MSI
178specification only allows the returned value to be a power of two,
179up to a maximum of 2^5 (32).
180
181If this function returns a negative number, it indicates the device is
182not capable of sending MSIs.
183
184If this function returns a positive number, it indicates the maximum
185number of MSI interrupt vectors that could be allocated.
186
1724.3 Using MSI-X 1874.3 Using MSI-X
173 188
174The MSI-X capability is much more flexible than the MSI capability. 189The MSI-X capability is much more flexible than the MSI capability.