aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation')
-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