Lines Matching refs:to

14 to change your driver to use MSI or MSI-X and some basic diagnostics to
20 A Message Signaled Interrupt is a write from the device to a special
21 address which causes an interrupt to be received by the CPU.
24 in PCI 3.0 to allow each interrupt to be masked individually. The MSI-X
26 per device than MSI and allows interrupts to be independently configured.
39 with an interrupt, which leads to reduced performance for the system as
42 When a device writes data to memory, then raises a pin-based interrupt,
45 bridges). In order to ensure that all the data has arrived in memory,
54 Often drivers have to query the device to find out what event has
57 to be specialised to a different purpose. One possible design gives
59 the driver to handle the normal interrupt handling path more efficiently.
60 Other possible designs include giving one interrupt to each packet queue
64 4. How to use MSIs
66 PCI devices are initialised to use pin-based interrupts. The device
67 driver has to set up the device to use MSI or MSI-X. Not all machines
69 will simply fail and the device will continue to use pin-based interrupts.
76 on x86, you must also enable X86_UP_APIC or SMP in order to see the
82 has to request that the PCI layer set up the MSI capability for this
89 A successful call allocates ONE interrupt to the device, regardless
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;
101 This function allows a device driver to request any number of MSI
102 interrupts within specified range from 'minvec' to 'maxvec'.
106 the device is switched from pin-based interrupt mode to MSI mode and
107 updates dev->irq to be the lowest of the new interrupts assigned to it.
108 The other interrupts assigned to the device are in the range dev->irq
109 to dev->irq + returned value - 1. Device driver can use the returned
110 number of successfully allocated MSI interrupts to further allocate
114 the driver should not attempt to request any more MSI interrupts for
122 there are many reasons why the platform may not be able to provide the
126 interrupts within a range. See chapter 4.3.1.3 to get the idea how to
127 handle such devices for MSI-X - the same logic applies to MSI.
131 The typical usage of MSI interrupts is to allocate as many vectors as
132 possible, likely up to the limit returned by pci_msi_vec_count() function:
152 If a driver is unable or unwilling to deal with a variable number of MSI
154 that number to pci_enable_msi_range() function as both 'minvec' and 'maxvec'
162 Note, unlike pci_enable_msi_exact() function, which could be also used to
178 Note, unlike pci_enable_msi() function, which could be also used to
187 This variation on pci_enable_msi_range() call allows a device driver to
191 the driver should not attempt to request any more MSI interrupts for
202 This function should be used to undo the effect of pci_enable_msi_range().
203 Calling it restores dev->irq to the pin-based interrupt number and frees
205 to another device, so drivers should not cache the value of dev->irq.
209 Failure to do so results in a BUG_ON(), leaving the device with
216 This function could be used to retrieve the number of MSI vectors the
218 specification only allows the returned value to be a power of two,
219 up to a maximum of 2^5 (32).
230 It supports up to 2048 interrupts, each of which can be controlled
235 u16 vector; /* kernel uses to write alloc vector */
236 u16 entry; /* driver uses to specify entry */
239 This allows for the device to use these interrupts in a sparse fashion;
241 two-element array. The driver is expected to fill in the 'entry' value
242 in each element of the array to indicate for which entries the kernel
243 should assign interrupts; it is invalid to fill in two entries with the
251 Calling this function asks the PCI subsystem to allocate any number of
252 MSI-X interrupts within specified range from 'minvec' to 'maxvec'.
253 The 'entries' argument is a pointer to an array of msix_entry structs
259 0 to the returned value - 1 is populated with the interrupt number;
261 decides to use. The device driver is responsible for keeping track of the
262 interrupts assigned to the MSI-X vectors so it can free them again later.
264 interrupts to further allocate and initialize device resources.
267 the driver should not attempt to allocate any more MSI-X interrupts for
278 there are many reasons why the platform may not be able to provide the
285 pci_enable_msix_range() can not be used alone to request MSI-X interrupts
288 to request the required number of MSI-X interrupts.
292 The typical usage of MSI-X interrupts is to allocate as many vectors as
293 possible, likely up to the limit returned by pci_msix_vec_count() function:
315 If a driver is unable or unwilling to deal with a variable number of MSI-X
317 that number to pci_enable_msix_range() function as both 'minvec' and 'maxvec'
326 Note, unlike pci_enable_msix_exact() function, which could be also used to
331 4.3.1.3 Specific requirements to the number of MSI-X interrupts
356 * -ENOSPC is the only error code allowed to be analyzed
382 This variation on pci_enable_msix_range() call allows a device driver to
386 the driver should not attempt to allocate any more MSI-X interrupts for
415 * -ENOSPC is the only error code allowed to be analyzed
438 This function should be used to undo the effect of pci_enable_msix_range().
440 subsequently be assigned to another device, so drivers should not cache
441 the value of the 'vector' elements over a call to pci_disable_msix().
445 Failure to do so results in a BUG_ON(), leaving the device with
452 be accessed directly by the device driver. If the driver wishes to
459 This function could be used to retrieve number of entries in the device
475 results in an error. If a device driver wishes to switch between MSI
477 it back to pin-interrupt mode, before calling pci_enable_msi_range()
479 to be a common operation but may be useful for debugging or testing
487 the MSI-X facilities in preference to the MSI facilities. As mentioned
489 In contrast, MSI is restricted to a maximum of 32 interrupts (and
491 be allocated consecutively, so the system might not be able to allocate
500 necessary to disable interrupts (Linux guarantees the same interrupt will
503 a different interrupt, the driver will deadlock trying to recursively
508 4.6 How to tell whether MSI/MSI-X is enabled on a device
518 Several PCI chipsets or devices are known not to support MSIs.
519 The PCI stack provides three ways to disable MSIs:
531 to detect them ourselves. The complete list of these is found near the
535 on the kernel command line to disable MSIs on all devices. It would be
536 in your best interests to report the problem to linux-pci@vger.kernel.org
537 including a full 'lspci -v' so we can add the quirks to the kernel.
541 Some PCI bridges are not able to route MSIs between busses properly.
544 Some bridges allow you to enable MSIs by changing some bits in their
548 If you have a bridge unknown to Linux, you can enable
566 Some devices are known to have faulty MSI implementations. Usually this
568 to handle this with a quirk. Some drivers have an option to disable use
576 be to examine your dmesg carefully to determine whether MSIs are enabled
577 for your machine. You should also check your .config to be sure you
583 to bridges between the PCI root and the device, MSIs are disabled.
585 It is also worth checking the device driver to see whether it supports MSIs.
586 For example, it may contain calls to pci_enable_msi_range() or