From: KarimAllah Ahmed <karahmed@amazon.de>
To: linux-pci@vger.kernel.org
Cc: "KarimAllah Ahmed" <karahmed@amazon.de>,
"Bjorn Helgaas" <bhelgaas@google.com>,
linux-kernel@vger.kernel.org,
"Jan H . Schönherr" <jschoenh@amazon.de>
Subject: [PATCH] pci: Do not read INTx PIN and LINE registers for virtual functions
Date: Wed, 17 Jan 2018 19:30:29 +0100 [thread overview]
Message-ID: <1516213829-14844-1-git-send-email-karahmed@amazon.de> (raw)
... since INTx is not supported by-spec for virtual functions.
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
---
drivers/pci/probe.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 65099d0..61002fb 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1232,6 +1232,13 @@ static void pci_read_irq(struct pci_dev *dev)
{
unsigned char irq;
+ /* Virtual functions do not have INTx support */
+ if (dev->is_virtfn) {
+ dev->pin = 0;
+ dev->irq = 0;
+ return;
+ }
+
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &irq);
dev->pin = irq;
if (irq)
--
2.7.4
next reply other threads:[~2018-01-17 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 18:30 KarimAllah Ahmed [this message]
2018-01-17 18:49 ` [PATCH] pci: Do not read INTx PIN and LINE registers for virtual functions Alex Williamson
2018-01-17 19:02 ` KarimAllah Ahmed
2018-01-17 19:12 ` Alex Williamson
2018-02-28 22:06 ` Bjorn Helgaas
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=1516213829-14844-1-git-send-email-karahmed@amazon.de \
--to=karahmed@amazon.de \
--cc=bhelgaas@google.com \
--cc=jschoenh@amazon.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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).