]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit03e9b26d858c77677621751e9a42c36f418a8c12
treef3ef41ae8a54215c83ce51db6f3573305a48eb72
parentd5c02329a1477a0a3310c62240adbda65e9ceaf9
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