diff options
author | Alexander Gordeev <agordeev@redhat.com> | 2013-12-30 07:28:16 (GMT) |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-04 00:17:55 (GMT) |
commit | 302a2523c277bea0bbe8340312b09507905849ed (patch) | |
tree | a2d971a8aa28744c65dd454bfe4509a9be7be623 /drivers/pci/pcie | |
parent | ff1aa430a2fa43189e89c7ddd559f0bee2298288 (diff) | |
download | linux-302a2523c277bea0bbe8340312b09507905849ed.tar.xz |
PCI/MSI: Add pci_enable_msi_range() and pci_enable_msix_range()
This adds pci_enable_msi_range(), which supersedes the pci_enable_msi()
and pci_enable_msi_block() MSI interfaces.
It also adds pci_enable_msix_range(), which supersedes the
pci_enable_msix() MSI-X interface.
The old interfaces have three categories of return values:
negative: failure; caller should not retry
positive: failure; value indicates number of interrupts that *could*
have been allocated, and caller may retry with a smaller request
zero: success; at least as many interrupts allocated as requested
It is error-prone to handle these three cases correctly in drivers.
The new functions return either a negative error code or a number of
successfully allocated MSI/MSI-X interrupts, which is expected to lead to
clearer device driver code.
pci_enable_msi(), pci_enable_msi_block() and pci_enable_msix() still exist
unchanged, but are deprecated and may be removed after callers are updated.
[bhelgaas: tweak changelog]
Suggested-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'drivers/pci/pcie')
0 files changed, 0 insertions, 0 deletions