linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: agordeev@redhat.com, linux-pci@vger.kernel.org
Cc: davem@davemloft.net, shane.huang@amd.com
Subject: [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors
Date: Sun, 11 Sep 2016 09:09:27 +0200	[thread overview]
Message-ID: <1473577767-9888-1-git-send-email-hch@lst.de> (raw)

Alex pointed out that we might want to use pci_intx_for_msi in
pci_alloc_irq_vectors for the case where allocating MSI or MSI-X vectors
fails completely.  I tried to read up the history behind pci_intx_for_msi,
but the changelogs seem a bit confusing, e.g. the comment in the tg3
around that code that was replaced by this quirk only talk about
_disabling_ INT-X.  Maybe someone can help me to shed some light about
this workaround, and help answering the question wether we need it
in this case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: David Miller <davem@davemloft.net>
Cc: Shane Huang <shane.huang@amd.com>
---
 drivers/pci/msi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9da5ecb..a4b443f 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -1215,7 +1215,7 @@ int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
 
 	/* use legacy irq if allowed */
 	if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1) {
-		pci_intx(dev, 1);
+		pci_intx_for_msi(dev, 1);
 		return 1;
 	}
 
-- 
2.1.4


             reply	other threads:[~2016-09-11  7:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-11  7:09 Christoph Hellwig [this message]
2016-09-20 19:46 ` [PATCH, RFC] PCI: use pci_intx_for_msi in pci_alloc_irq_vectors Bjorn Helgaas
2016-09-20 20:03   ` Christoph Hellwig

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=1473577767-9888-1-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=agordeev@redhat.com \
    --cc=davem@davemloft.net \
    --cc=linux-pci@vger.kernel.org \
    --cc=shane.huang@amd.com \
    /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).