diff options
author | Michael Witten <mfwitten@gmail.com> | 2011-07-14 15:52:56 -0400 |
---|---|---|
committer | Michael Witten <mfwitten@gmail.com> | 2011-08-02 17:34:31 -0400 |
commit | 4979de6efb5553505a595eadc1cf7c386ca1ddc6 (patch) | |
tree | fc92361dccd0ba0e4d6027ab5796a69fe8629325 /Documentation/PCI | |
parent | 891f692533c36a17f00d25d24e4ac44ef38c9e5c (diff) |
Docs: MSI-HOWTO: Use present tense and streamline some wording
Signed-off-by: Michael Witten <mfwitten@gmail.com>
Acked-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Diffstat (limited to 'Documentation/PCI')
-rw-r--r-- | Documentation/PCI/MSI-HOWTO.txt | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/Documentation/PCI/MSI-HOWTO.txt b/Documentation/PCI/MSI-HOWTO.txt index 43ffff1b5618..13f3a9930ad5 100644 --- a/Documentation/PCI/MSI-HOWTO.txt +++ b/Documentation/PCI/MSI-HOWTO.txt | |||
@@ -86,13 +86,13 @@ device. | |||
86 | 86 | ||
87 | int pci_enable_msi(struct pci_dev *dev) | 87 | int pci_enable_msi(struct pci_dev *dev) |
88 | 88 | ||
89 | A successful call will allocate ONE interrupt to the device, regardless | 89 | A successful call allocates ONE interrupt to the device, regardless |
90 | of how many MSIs the device supports. The device will be switched from | 90 | of how many MSIs the device supports. The device is switched from |
91 | pin-based interrupt mode to MSI mode. The dev->irq number is changed | 91 | pin-based interrupt mode to MSI mode. The dev->irq number is changed |
92 | to a new number which represents the message signaled interrupt. | 92 | to a new number which represents the message signaled interrupt; |
93 | This function should be called before the driver calls request_irq() | 93 | consequently, this function should be called before the driver calls |
94 | since enabling MSIs disables the pin-based IRQ and the driver will not | 94 | request_irq(), because an MSI is delivered via a vector that is |
95 | receive interrupts on the old interrupt. | 95 | different from the vector of a pin-based interrupt. |
96 | 96 | ||
97 | 4.2.2 pci_enable_msi_block | 97 | 4.2.2 pci_enable_msi_block |
98 | 98 | ||
@@ -111,10 +111,10 @@ the device are in the range dev->irq to dev->irq + count - 1. | |||
111 | 111 | ||
112 | If this function returns a negative number, it indicates an error and | 112 | If this function returns a negative number, it indicates an error and |
113 | the driver should not attempt to request any more MSI interrupts for | 113 | the driver should not attempt to request any more MSI interrupts for |
114 | this device. If this function returns a positive number, it will be | 114 | this device. If this function returns a positive number, it is |
115 | less than 'count' and indicate the number of interrupts that could have | 115 | less than 'count' and indicates the number of interrupts that could have |
116 | been allocated. In neither case will the irq value have been | 116 | been allocated. In neither case is the irq value updated or the device |
117 | updated, nor will the device have been switched into MSI mode. | 117 | switched into MSI mode. |
118 | 118 | ||
119 | The device driver must decide what action to take if | 119 | The device driver must decide what action to take if |
120 | pci_enable_msi_block() returns a value less than the number asked for. | 120 | pci_enable_msi_block() returns a value less than the number asked for. |
@@ -124,7 +124,7 @@ again. Note that it is not guaranteed to succeed, even when the | |||
124 | 'count' has been reduced to the value returned from a previous call to | 124 | 'count' has been reduced to the value returned from a previous call to |
125 | pci_enable_msi_block(). This is because there are multiple constraints | 125 | pci_enable_msi_block(). This is because there are multiple constraints |
126 | on the number of vectors that can be allocated; pci_enable_msi_block() | 126 | on the number of vectors that can be allocated; pci_enable_msi_block() |
127 | will return as soon as it finds any constraint that doesn't allow the | 127 | returns as soon as it finds any constraint that doesn't allow the |
128 | call to succeed. | 128 | call to succeed. |
129 | 129 | ||
130 | 4.2.3 pci_disable_msi | 130 | 4.2.3 pci_disable_msi |
@@ -139,8 +139,8 @@ device, so drivers should not cache the value of dev->irq. | |||
139 | 139 | ||
140 | A device driver must always call free_irq() on the interrupt(s) | 140 | A device driver must always call free_irq() on the interrupt(s) |
141 | for which it has called request_irq() before calling this function. | 141 | for which it has called request_irq() before calling this function. |
142 | Failure to do so will result in a BUG_ON(), the device will be left with | 142 | Failure to do so results in a BUG_ON(), leaving the device with |
143 | MSI enabled and will leak its vector. | 143 | MSI enabled and thus leaking its vector. |
144 | 144 | ||
145 | 4.3 Using MSI-X | 145 | 4.3 Using MSI-X |
146 | 146 | ||
@@ -168,10 +168,10 @@ int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec) | |||
168 | Calling this function asks the PCI subsystem to allocate 'nvec' MSIs. | 168 | Calling this function asks the PCI subsystem to allocate 'nvec' MSIs. |
169 | The 'entries' argument is a pointer to an array of msix_entry structs | 169 | The 'entries' argument is a pointer to an array of msix_entry structs |
170 | which should be at least 'nvec' entries in size. On success, the | 170 | which should be at least 'nvec' entries in size. On success, the |
171 | function will return 0 and the device will have been switched into | 171 | device is switched into MSI-X mode and the function returns 0. |
172 | MSI-X interrupt mode. The 'vector' elements in each entry will have | 172 | The 'vector' member in each entry is populated with the interrupt number; |
173 | been filled in with the interrupt number. The driver should then call | 173 | the driver should then call request_irq() for each 'vector' that it |
174 | request_irq() for each 'vector' that it decides to use. | 174 | decides to use. |
175 | 175 | ||
176 | If this function returns a negative number, it indicates an error and | 176 | If this function returns a negative number, it indicates an error and |
177 | the driver should not attempt to allocate any more MSI-X interrupts for | 177 | the driver should not attempt to allocate any more MSI-X interrupts for |
@@ -219,8 +219,8 @@ the value of the 'vector' elements over a call to pci_disable_msix(). | |||
219 | 219 | ||
220 | A device driver must always call free_irq() on the interrupt(s) | 220 | A device driver must always call free_irq() on the interrupt(s) |
221 | for which it has called request_irq() before calling this function. | 221 | for which it has called request_irq() before calling this function. |
222 | Failure to do so will result in a BUG_ON(), the device will be left with | 222 | Failure to do so results in a BUG_ON(), leaving the device with |
223 | MSI enabled and will leak its vector. | 223 | MSI-X enabled and thus leaking its vector. |
224 | 224 | ||
225 | 4.3.3 The MSI-X Table | 225 | 4.3.3 The MSI-X Table |
226 | 226 | ||
@@ -235,7 +235,7 @@ If a device implements both MSI and MSI-X capabilities, it can | |||
235 | run in either MSI mode or MSI-X mode but not both simultaneously. | 235 | run in either MSI mode or MSI-X mode but not both simultaneously. |
236 | This is a requirement of the PCI spec, and it is enforced by the | 236 | This is a requirement of the PCI spec, and it is enforced by the |
237 | PCI layer. Calling pci_enable_msi() when MSI-X is already enabled or | 237 | PCI layer. Calling pci_enable_msi() when MSI-X is already enabled or |
238 | pci_enable_msix() when MSI is already enabled will result in an error. | 238 | pci_enable_msix() when MSI is already enabled results in an error. |
239 | If a device driver wishes to switch between MSI and MSI-X at runtime, | 239 | If a device driver wishes to switch between MSI and MSI-X at runtime, |
240 | it must first quiesce the device, then switch it back to pin-interrupt | 240 | it must first quiesce the device, then switch it back to pin-interrupt |
241 | mode, before calling pci_enable_msi() or pci_enable_msix() and resuming | 241 | mode, before calling pci_enable_msi() or pci_enable_msix() and resuming |
@@ -281,7 +281,7 @@ disabled to enabled and back again. | |||
281 | 281 | ||
282 | Using 'lspci -v' (as root) may show some devices with "MSI", "Message | 282 | Using 'lspci -v' (as root) may show some devices with "MSI", "Message |
283 | Signalled Interrupts" or "MSI-X" capabilities. Each of these capabilities | 283 | Signalled Interrupts" or "MSI-X" capabilities. Each of these capabilities |
284 | has an 'Enable' flag which will be followed with either "+" (enabled) | 284 | has an 'Enable' flag which is followed with either "+" (enabled) |
285 | or "-" (disabled). | 285 | or "-" (disabled). |
286 | 286 | ||
287 | 287 | ||
@@ -298,7 +298,7 @@ The PCI stack provides three ways to disable MSIs: | |||
298 | 298 | ||
299 | Some host chipsets simply don't support MSIs properly. If we're | 299 | Some host chipsets simply don't support MSIs properly. If we're |
300 | lucky, the manufacturer knows this and has indicated it in the ACPI | 300 | lucky, the manufacturer knows this and has indicated it in the ACPI |
301 | FADT table. In this case, Linux will automatically disable MSIs. | 301 | FADT table. In this case, Linux automatically disables MSIs. |
302 | Some boards don't include this information in the table and so we have | 302 | Some boards don't include this information in the table and so we have |
303 | to detect them ourselves. The complete list of these is found near the | 303 | to detect them ourselves. The complete list of these is found near the |
304 | quirk_disable_all_msi() function in drivers/pci/quirks.c. | 304 | quirk_disable_all_msi() function in drivers/pci/quirks.c. |