Skip to content

Commit 917bfd9

Browse files
awilliambjorn-helgaas
authored andcommitted
ACPI / PCI: Account for ARI in _PRT lookups
The PCIe specification, rev 3.0, section 2.2.8.1, contains the following implementation note: Virtual Wire Mapping for INTx Interrupts From ARI Devices The implied Device Number for an ARI Device is 0. When ARI-aware software (including BIOS and operating system) enables ARI Forwarding in the Downstream Port immediately above an ARI Device in order to access its Extended Functions, software must comprehend that the Downstream Port will use Device Number 0 for the virtual wire mappings of INTx interrupts coming from all Functions of the ARI Device. If non-ARI-aware software attempts to determine the virtual wire mappings for Extended Functions, it can come up with incorrect mappings by examining the traditional Device Number field and finding it to be non-0. We account for this in pci_swizzle_interrupt_pin(), but it looks like we miss it here, looking for a _PRT entry with a slot matching the ARI device slot number. This can cause errors like: pcieport 0000:80:03.0: can't derive routing for PCI INT B sfc 0000:82:01.1: PCI INT B: no GSI pci_dev.irq is then invalid, resulting in errors for drivers that attempt to enable INTx on the device. Fix by using slot 0 for ARI enabled devices. Signed-off-by: Alex Williamson <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Don Dutile <[email protected]> Acked-by: Rafael J. Wysocki <[email protected]>
1 parent 19bdb6e commit 917bfd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/pci_irq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ static int acpi_pci_irq_check_entry(acpi_handle handle, struct pci_dev *dev,
163163
{
164164
int segment = pci_domain_nr(dev->bus);
165165
int bus = dev->bus->number;
166-
int device = PCI_SLOT(dev->devfn);
166+
int device = pci_ari_enabled(dev->bus) ? 0 : PCI_SLOT(dev->devfn);
167167
struct acpi_prt_entry *entry;
168168

169169
if (((prt->address >> 16) & 0xffff) != device ||

0 commit comments

Comments
 (0)