From: Christoph Hellwig <hch@lst.de>
To: bhelgaas@google.com, Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub
Date: Fri, 26 May 2017 07:46:04 +0200 [thread overview]
Message-ID: <20170526054604.GA18291@lst.de> (raw)
In-Reply-To: <20170520165954.GA26936@lst.de>
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---
next prev parent reply other threads:[~2017-05-26 5:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-20 13:21 PCI irq affinity fix for 4.12 Christoph Hellwig
2017-05-20 13:21 ` [PATCH] PCI/msi: fix the pci_alloc_irq_vectors_affinity stub Christoph Hellwig
2017-05-20 16:59 ` [PATCH v2] " Christoph Hellwig
2017-05-26 5:46 ` Christoph Hellwig [this message]
2017-05-26 15:46 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170526054604.GA18291@lst.de \
--to=hch@lst.de \
--cc=bhelgaas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).