public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pci: Do not read INTx PIN and LINE registers for virtual functions
@ 2018-01-17 18:30 KarimAllah Ahmed
  2018-01-17 18:49 ` Alex Williamson
  2018-02-28 22:06 ` Bjorn Helgaas
  0 siblings, 2 replies; 5+ messages in thread
From: KarimAllah Ahmed @ 2018-01-17 18:30 UTC (permalink / raw)
  To: linux-pci
  Cc: KarimAllah Ahmed, Bjorn Helgaas, linux-kernel,
	Jan H . Schönherr

... 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-02-28 22:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17 18:30 [PATCH] pci: Do not read INTx PIN and LINE registers for virtual functions KarimAllah Ahmed
2018-01-17 18:49 ` Alex Williamson
2018-01-17 19:02   ` KarimAllah Ahmed
2018-01-17 19:12     ` Alex Williamson
2018-02-28 22:06 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox