Skip to content
Commit 30ff3e8c authored by Piotr Stankiewicz's avatar Piotr Stankiewicz Committed by Bjorn Helgaas
Browse files

PCI/MSI: Forward MSI-X error code in pci_alloc_irq_vectors_affinity()

When debugging an issue where I was asking the PCI machinery to enable a
set of MSI-X vectors, without falling back on MSI, I ran across a behaviour
which seems odd. The pci_alloc_irq_vectors_affinity() will always return
-ENOSPC on failure, when allocating MSI-X vectors only, whereas with MSI
fallback it will forward any error returned by __pci_enable_msi_range().
This is a confusing behaviour, so have the pci_alloc_irq_vectors_affinity()
forward the error code from __pci_enable_msix_range() when appropriate.

Link: https://lore.kernel.org/r/20200616073318.20229-1-piotr.stankiewicz@intel.com


Signed-off-by: default avatarPiotr Stankiewicz <piotr.stankiewicz@intel.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: default avatarLogan Gunthorpe <logang@deltatee.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
parent b3a9e3b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment