diff options
author | KarimAllah Ahmed <karahmed@amazon.de> | 2018-01-17 19:30:29 +0100 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-03-05 15:10:14 +0100 |
commit | be20f6b063f51cd77d071b803ee24f23200dc559 (patch) | |
tree | 247d8cd73adbdaeabc2c4952429833ffbd534f6d /drivers | |
parent | PCI: Wait for device to become ready after secondary bus reset (diff) | |
download | linux-be20f6b063f51cd77d071b803ee24f23200dc559.tar.xz linux-be20f6b063f51cd77d071b803ee24f23200dc559.zip |
PCI/IOV: Skip INTx config reads for VFs
Per PCIe r4.0, sec 9.2.1.4, VFs can not implement INTX, and their Interrupt
Line and Interrupt Pin registers must be RO Zero. Some devices have
thousands of VFs, so skip reading the registers as an optimization.
Signed-off-by: KarimAllah Ahmed <karahmed@amazon.de>
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
[bhelgaas: changelog, comment]
Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/probe.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 489660d0d384..a1cddca37793 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -1230,6 +1230,13 @@ static void pci_read_irq(struct pci_dev *dev) { unsigned char irq; + /* VFs are not allowed to use INTx, so skip the config reads */ + 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) |