diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2013-12-30 02:28:13 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-03 19:17:55 -0500 |
commit | d1ac1d2622e8f0fd2a25127a8649d135b54db8a9 (patch) | |
tree | 9b267fa3c5d97fc9c6c65877a9d493d407258abe /Documentation/PCI | |
parent | 52179dc9edc3b7a2b3bb01cbb1b6c96f6d05fc73 (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.txt | 15 |
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(). | |||
169 | Failure to do so results in a BUG_ON(), leaving the device with | 169 | Failure to do so results in a BUG_ON(), leaving the device with |
170 | MSI enabled and thus leaking its vector. | 170 | MSI enabled and thus leaking its vector. |
171 | 171 | ||
172 | 4.2.5 pci_msi_vec_count | ||
173 | |||
174 | int pci_msi_vec_count(struct pci_dev *dev) | ||
175 | |||
176 | This function could be used to retrieve the number of MSI vectors the | ||
177 | device requested (via the Multiple Message Capable register). The MSI | ||
178 | specification only allows the returned value to be a power of two, | ||
179 | up to a maximum of 2^5 (32). | ||
180 | |||
181 | If this function returns a negative number, it indicates the device is | ||
182 | not capable of sending MSIs. | ||
183 | |||
184 | If this function returns a positive number, it indicates the maximum | ||
185 | number of MSI interrupt vectors that could be allocated. | ||
186 | |||
172 | 4.3 Using MSI-X | 187 | 4.3 Using MSI-X |
173 | 188 | ||
174 | The MSI-X capability is much more flexible than the MSI capability. | 189 | The MSI-X capability is much more flexible than the MSI capability. |