diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:43:54 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 13:43:54 -0700 |
commit | a0fedc857dff457e123aeaa2039d28ac90e543df (patch) | |
tree | 9f9a8bba856f5ad95acbef2c9109c061452a9f6f /drivers | |
parent | 9cf2bab6307659b940da65d16dcc8f82c69f3a97 (diff) | |
parent | 6da4b3ab9a6e9b1b5f90322ab3fa3a7dd18edb19 (diff) |
Merge branch 'irq/for-block' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into for-4.21/block
Pull in the irq affinity commits, that are staged through Thomas's
tree.
* 'irq/for-block' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
genirq/affinity: Add support for allocating interrupt sets
genirq/affinity: Pass first vector to __irq_build_affinity_masks()
genirq/affinity: Move two stage affinity spreading into a helper function
genirq/affinity: Spread IRQs to all available NUMA nodes
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/msi.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index af24ed50a245..265ed3e4c920 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -1036,6 +1036,13 @@ static int __pci_enable_msi_range(struct pci_dev *dev, int minvec, int maxvec, if (maxvec < minvec) return -ERANGE; + /* + * If the caller is passing in sets, we can't support a range of + * vectors. The caller needs to handle that. + */ + if (affd && affd->nr_sets && minvec != maxvec) + return -EINVAL; + if (WARN_ON_ONCE(dev->msi_enabled)) return -EINVAL; @@ -1087,6 +1094,13 @@ static int __pci_enable_msix_range(struct pci_dev *dev, if (maxvec < minvec) return -ERANGE; + /* + * If the caller is passing in sets, we can't support a range of + * supported vectors. The caller needs to handle that. + */ + if (affd && affd->nr_sets && minvec != maxvec) + return -EINVAL; + if (WARN_ON_ONCE(dev->msix_enabled)) return -EINVAL; |