diff options
author | Christoph Hellwig <hch@lst.de> | 2017-02-15 02:58:22 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-15 11:32:57 -0500 |
commit | c3cf2c61ddc1410424da0ea87717edf16fc296c5 (patch) | |
tree | fe2a895e44148f40772eb392ff94a64e62e0469e /Documentation/PCI | |
parent | 948b7620c15411444167a62cfc14cdd4b0e44682 (diff) |
PCI/MSI: Document pci_alloc_irq_vectors(), deprecate pci_enable_msi()
Document pci_alloc_irq_vectors() instead of the deprecated pci_enable_msi()
and pci_enable_msix() APIs.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'Documentation/PCI')
-rw-r--r-- | Documentation/PCI/pci.txt | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Documentation/PCI/pci.txt b/Documentation/PCI/pci.txt index 77f49dc5be23..611a75e4366e 100644 --- a/Documentation/PCI/pci.txt +++ b/Documentation/PCI/pci.txt | |||
@@ -382,18 +382,18 @@ The fundamental difference between MSI and MSI-X is how multiple | |||
382 | "vectors" get allocated. MSI requires contiguous blocks of vectors | 382 | "vectors" get allocated. MSI requires contiguous blocks of vectors |
383 | while MSI-X can allocate several individual ones. | 383 | while MSI-X can allocate several individual ones. |
384 | 384 | ||
385 | MSI capability can be enabled by calling pci_enable_msi() or | 385 | MSI capability can be enabled by calling pci_alloc_irq_vectors() with the |
386 | pci_enable_msix() before calling request_irq(). This causes | 386 | PCI_IRQ_MSI and/or PCI_IRQ_MSIX flags before calling request_irq(). This |
387 | the PCI support to program CPU vector data into the PCI device | 387 | causes the PCI support to program CPU vector data into the PCI device |
388 | capability registers. | 388 | capability registers. Many architectures, chip-sets, or BIOSes do NOT |
389 | 389 | support MSI or MSI-X and a call to pci_alloc_irq_vectors with just | |
390 | If your PCI device supports both, try to enable MSI-X first. | 390 | the PCI_IRQ_MSI and PCI_IRQ_MSIX flags will fail, so try to always |
391 | Only one can be enabled at a time. Many architectures, chip-sets, | 391 | specify PCI_IRQ_LEGACY as well. |
392 | or BIOSes do NOT support MSI or MSI-X and the call to pci_enable_msi/msix | 392 | |
393 | will fail. This is important to note since many drivers have | 393 | Drivers that have different interrupt handlers for MSI/MSI-X and |
394 | two (or more) interrupt handlers: one for MSI/MSI-X and another for IRQs. | 394 | legacy INTx should chose the right one based on the msi_enabled |
395 | They choose which handler to register with request_irq() based on the | 395 | and msix_enabled flags in the pci_dev structure after calling |
396 | return value from pci_enable_msi/msix(). | 396 | pci_alloc_irq_vectors. |
397 | 397 | ||
398 | There are (at least) two really good reasons for using MSI: | 398 | There are (at least) two really good reasons for using MSI: |
399 | 1) MSI is an exclusive interrupt vector by definition. | 399 | 1) MSI is an exclusive interrupt vector by definition. |