Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1651087
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Christoph Hellwig <hch@lst.de> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub |
| Date | Fri, 26 May 2017 07:50:01 +0200 |
| Message-ID | <tLgil-1RI-3@gated-at.bofh.it> (permalink) |
| References | <tJcCe-20L-3@gated-at.bofh.it> <tJcCe-20L-1@gated-at.bofh.it> <tJg37-4h7-11@gated-at.bofh.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.17 (2007-11-01) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 46 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Fri, 26 May 2017 07:46:04 +0200 |
| X-Original-Message-ID | <20170526054604.GA18291@lst.de> |
| X-Original-References | <20170520132129.16430-1-hch@lst.de> <20170520132129.16430-2-hch@lst.de> <20170520165954.GA26936@lst.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1651087 |
Show key headers only | View raw
Bjorn,
can you take this regression fix and sent it to Linux before -rc3?
I had hope we could get it into -rc2 but already missed that, and
I haven't heard a comment since..
On Sat, May 20, 2017 at 06:59:54PM +0200, Christoph Hellwig wrote:
> 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.
>
> Also valid dev->irq and use the "correct" errno value based on feedback
> from Linus.
>
> 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")
> ---
>
> Changes from V1:
> - use == comparism
> - return -ENOSPC
> - verify dev->irq
>
> include/linux/pci.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 33c2b0b77429..fc2e832d7b9c 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -1342,9 +1342,9 @@ 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)
> - return -EINVAL;
> - return 1;
> + if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1 && dev->irq)
> + return 1;
> + return -ENOSPC;
> }
>
> static inline void pci_free_irq_vectors(struct pci_dev *dev)
> --
> 2.11.0
---end quoted text---
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v2] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub Christoph Hellwig <hch@lst.de> - 2017-05-26 07:50 +0200 Re: [PATCH v2] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub Linus Torvalds <torvalds@linux-foundation.org> - 2017-05-26 17:50 +0200
csiph-web