Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646118

[PATCH] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub

From Christoph Hellwig <hch@lst.de>
Newsgroups linux.kernel
Subject [PATCH] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub
Date 2017-05-20 15:30 +0200
Message-ID <tJcCe-20L-1@gated-at.bofh.it> (permalink)
References <tJcCe-20L-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


We need to return an error for any call that asks for MSI / MSI-X
vectors only, so that non-trivial fallback logic can work properly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Steven Rostedt <rostedt@goodmis.org>
Fixes: aff17164 ("PCI: Provide sensible IRQ vector alloc/free routines")
---
 include/linux/pci.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 33c2b0b77429..5a7fd3b6a7b9 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1342,7 +1342,7 @@ pci_alloc_irq_vectors_affinity(struct pci_dev *dev, unsigned int min_vecs,
 			       unsigned int max_vecs, unsigned int flags,
 			       const struct irq_affinity *aff_desc)
 {
-	if (min_vecs > 1)
+	if (min_vecs > 1 || !(flags & PCI_IRQ_LEGACY))
 		return -EINVAL;
 	return 1;
 }
-- 
2.11.0

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub Christoph Hellwig <hch@lst.de> - 2017-05-20 15:30 +0200
  [PATCH v2] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub Christoph Hellwig <hch@lst.de> - 2017-05-20 19:10 +0200

csiph-web