mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 22:28:00 +00:00
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>
This commit is contained in:
parent
6b2f1351af
commit
be20f6b063
1 changed files with 7 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue