aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/PCI
diff options
context:
space:
mode:
authorAlexander Gordeev <agordeev@redhat.com>2014-01-17 04:26:20 -0500
committerBjorn Helgaas <bhelgaas@google.com>2014-02-04 01:08:49 -0500
commit9a8b0af9b1dacf1d865d4b8bff7360e5b318481a (patch)
treec9bd078e3860228d1271b89f59af306f229a85e2 /Documentation/PCI
parent39af663b5fd25c9dd427e12e106763b6b4f9572c (diff)
PCI/MSI: Add pci_enable_msi() documentation back
We deprecated pci_enable_msi() in 302a2523c277 ("PCI/MSI: Add pci_enable_msi_range() and pci_enable_msix_range()"). But we changed our minds after noticing that: - pci_enable_msi() doesn't have confusing return values like pci_enable_msi_block() and pci_enable_msix() did, and - pci_enable_msi() has a hundred or so callers that we don't want to change. This adds back the pci_enable_msi() documentation. [bhelgaas: changelog] Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'Documentation/PCI')
-rw-r--r--Documentation/PCI/MSI-HOWTO.txt23
1 files changed, 20 insertions, 3 deletions
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt
index a8d01005f480..3c3080e9afef 100644
--- a/Documentation/PCI/MSI-HOWTO.txt
+++ b/Documentation/PCI/MSI-HOWTO.txt
@@ -82,7 +82,19 @@ Most of the hard work is done for the driver in the PCI layer. It simply
82has to request that the PCI layer set up the MSI capability for this 82has to request that the PCI layer set up the MSI capability for this
83device. 83device.
84 84
854.2.1 pci_enable_msi_range 854.2.1 pci_enable_msi
86
87int pci_enable_msi(struct pci_dev *dev)
88
89A successful call allocates ONE interrupt to the device, regardless
90of how many MSIs the device supports. The device is switched from
91pin-based interrupt mode to MSI mode. The dev->irq number is changed
92to a new number which represents the message signaled interrupt;
93consequently, this function should be called before the driver calls
94request_irq(), because an MSI is delivered via a vector that is
95different from the vector of a pin-based interrupt.
96
974.2.2 pci_enable_msi_range
86 98
87int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec) 99int pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec)
88 100
@@ -158,7 +170,12 @@ static int foo_driver_enable_single_msi(struct pci_dev *pdev)
158 return pci_enable_msi_range(pdev, 1, 1); 170 return pci_enable_msi_range(pdev, 1, 1);
159} 171}
160 172
1614.2.2 pci_disable_msi 173Note, unlike pci_enable_msi() function, which could be also used to
174enable the single MSI mode, pci_enable_msi_range() returns either a
175negative errno or 1 (not negative errno or 0 - as pci_enable_msi()
176does).
177
1784.2.3 pci_disable_msi
162 179
163void pci_disable_msi(struct pci_dev *dev) 180void pci_disable_msi(struct pci_dev *dev)
164 181
@@ -172,7 +189,7 @@ on any interrupt for which it previously called request_irq().
172Failure to do so results in a BUG_ON(), leaving the device with 189Failure to do so results in a BUG_ON(), leaving the device with
173MSI enabled and thus leaking its vector. 190MSI enabled and thus leaking its vector.
174 191
1754.2.3 pci_msi_vec_count 1924.2.4 pci_msi_vec_count
176 193
177int pci_msi_vec_count(struct pci_dev *dev) 194int pci_msi_vec_count(struct pci_dev *dev)
178 195