diff options
author | Dennis Chen <dennis.chen@arm.com> | 2016-12-01 05:15:04 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2017-02-11 01:15:08 +0300 |
commit | 948b7620c15411444167a62cfc14cdd4b0e44682 (patch) | |
tree | 9bdb363fce0c066a073a7a827b9746604a50eff2 /drivers/pci/msi.c | |
parent | 3674cc49da9a8fc55bf1dec2ab03a66c77f2dcdf (diff) | |
download | linux-948b7620c15411444167a62cfc14cdd4b0e44682.tar.xz |
PCI/MSI: Return -ENOSPC if pci_enable_msi_range() can't get enough vectors
If device doesn't support as many MSI vectors as the driver requested, we
previously returned -EINVAL from __pci_enable_msi_range() and
pci_enable_msi_range(). In other similar situations in both
__pci_enable_msi_range() and __pci_enable_msix_range(), we returned
-ENOSPC.
Return -ENOSPC from __pci_enable_msi_range() so we do it consistently.
[bhelgaas: changelog]
Signed-off-by: Dennis Chen <dennis.chen@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: Tejun Heo <tj@kernel.org>
CC: Christoph Hellwig <hch@lst.de>
CC: Tom Long Nguyen <tom.l.nguyen@intel.com>
CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
CC: Marc Zyngier <marc.zyngier@arm.com>
CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
CC: Steve Capper <steve.capper@arm.com>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r-- | drivers/pci/msi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 52ac675f0bd7..93cc268c6ff1 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -1065,7 +1065,7 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec, if (nvec < 0) return nvec; if (nvec < minvec) - return -EINVAL; + return -ENOSPC; if (nvec > maxvec) nvec = maxvec; |