OSDN Git Service

PCI: Test for std config alias when testing extended config space
authorAlex Williamson <alex.williamson@redhat.com>
Mon, 5 May 2014 20:20:51 +0000 (14:20 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 27 May 2014 21:07:41 +0000 (15:07 -0600)
commit78916b00f0096059c872f537306b1a464c84fb30
treef3ef41ae8a54215c83ce51db6f3573305a48eb72
parent9edbcd2252b5ef148177c9f2c11a56469cf5db52
PCI: Test for std config alias when testing extended config space

When a PCI-to-PCIe bridge is stacked on a PCIe-to-PCI bridge, we can have
PCIe endpoints masked by a conventional PCI bus.  This makes the extended
config space of the PCIe endpoint inaccessible.  The PCIe-to-PCI bridge is
supposed to handle any type 1 configuration transactions where the extended
config offset bits are non-zero as an Unsupported Request rather than
forward it to the secondary interface.  As noted here, there are a couple
known offenders to this rule.  These bridges drop the extended offset bits,
resulting in the conventional config space being aliased many times across
the extended config space.  For Intel NICs, this alias often seems to
expose a bogus SR-IOV cap.

Stacking bridges may seem like an uncommon scenario, but note that any
conventional PCI slot in a modern PC is already the secondary interface of
an onboard PCIe-to-PCI bridge.  The user need only add a PCI-to-PCIe
adapter and PCIe device to encounter this problem.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/probe.c