linux/drivers/pci
Mika Westerberg ca78410403 PCI: Get rid of dev->has_secondary_link flag
In some systems, the Device/Port Type in the PCI Express Capabilities
register incorrectly identifies upstream ports as downstream ports.

d0751b98df ("PCI: Add dev->has_secondary_link to track downstream PCIe
links") addressed this by adding pci_dev.has_secondary_link, which is set
for downstream ports.  But this is confusing because pci_pcie_type()
sometimes gives the wrong answer, and it's not obvious that we should use
pci_dev.has_secondary_link instead.

Reduce the confusion by correcting the type of the port itself so that
pci_pcie_type() returns the actual type regardless of what the Device/Port
Type register claims it is.  Update the users to call pci_pcie_type() and
pcie_downstream_port() accordingly, and remove pci_dev.has_secondary_link
completely.

Link: https://lore.kernel.org/linux-pci/20190703133953.GK128603@google.com/
Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20190822085553.62697-2-mika.westerberg@linux.intel.com
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2019-09-07 07:45:31 -05:00
..
controller Merge branch 'pci/trivial' 2019-07-12 17:08:41 -05:00
endpoint
hotplug
pcie PCI: Get rid of dev->has_secondary_link flag 2019-09-07 07:45:31 -05:00
switch New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
access.c PCI: Make pcie_downstream_port() available outside of access.c 2019-09-07 07:45:25 -05:00
ats.c
bus.c
ecam.c
host-bridge.c
iov.c
irq.c
Kconfig
Makefile
mmap.c
msi.c New feature to add support for NTB virtual MSI interrupts, the ability 2019-07-21 09:46:59 -07:00
of.c
p2pdma.c pci-v5.3-changes 2019-07-15 20:44:49 -07:00
pci-acpi.c PCI/ACPI: Remove unnecessary struct hotplug_program_ops 2019-08-28 15:29:14 -05:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c pci-v5.3-changes 2019-07-15 20:44:49 -07:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c
pci.c PCI: Get rid of dev->has_secondary_link flag 2019-09-07 07:45:31 -05:00
pci.h PCI: Make pcie_downstream_port() available outside of access.c 2019-09-07 07:45:25 -05:00
probe.c PCI: Get rid of dev->has_secondary_link flag 2019-09-07 07:45:31 -05:00
proc.c
quirks.c PCI: Enable NVIDIA HDA controllers 2019-07-11 11:13:26 -05:00
remove.c
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c
syscall.c
vc.c PCI: Get rid of dev->has_secondary_link flag 2019-09-07 07:45:31 -05:00
vpd.c
xen-pcifront.c