linux-stable/drivers/pci
Rafael J. Wysocki aa0b1574fd PCI/ACPI: Fix companion lookup for device 0 on the root bus
In some cases acpi_pci_find_companion() returns an incorrect device object
as the ACPI companion for device 0 on the root bus (bus 0).

On the affected systems that device is the PCI interface to the host bridge
and the "ACPI companion" returned for it corresponds to a non-PCI device
located in the SoC (e.g. a sensor on an I2C bus).  As a result of this, the
ACPI device object "attached" to PCI device 00:00.0 cannot be used for
enumerating the device that is really represented by it which (of course)
is problematic.

Address that issue by preventing acpi_pci_find_companion() from returning a
device object with a valid _HID (which by the spec should not be present
uder ACPI device objects corresponding to PCI devices) for PCI device
00:00.0.

[bhelgaas: use pci_is_root_bus()]
Link: https://lore.kernel.org/linux-acpi/1409ba0c-1580-dc09-e6fe-a0c9bcda6462@gmail.com/
Link: https://lore.kernel.org/r/4673285.9aE2nYKHPr@kreacher
Reported-by: Daniel Scally <djrscally@gmail.com>
Tested-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
2020-12-11 17:20:36 -06:00
..
controller PCI: mvebu: Fix duplicate resource requests 2020-11-04 13:55:30 -06:00
endpoint PCI: Fix kerneldoc warnings 2020-08-05 18:23:14 -05:00
hotplug pci-v5.10-changes 2020-10-22 12:41:00 -07:00
pcie Merge branch 'pci/misc' 2020-10-21 09:58:36 -05:00
switch PCI: switchtec: Add missing __iomem tag to fix sparse warnings 2020-07-31 11:23:45 -05:00
access.c Merge branch 'pci/misc' 2020-08-05 18:24:16 -05:00
ats.c Merge branch 'pci/doc' 2020-08-05 18:24:22 -05:00
bus.c PCI: Add device even if driver attach failed 2020-07-07 17:33:41 -05:00
ecam.c PCI/ACPI: Add Ampere Altra SOC MCFG quirk 2020-09-17 12:27:43 -05:00
host-bridge.c
iov.c PCI/IOV: Mark VFs as not implementing PCI_COMMAND_MEMORY 2020-09-21 14:42:11 -06:00
irq.c PCI: Remove unused pci_lost_interrupt() 2020-07-29 14:25:18 -05:00
Kconfig pci-v5.10-changes 2020-10-22 12:41:00 -07:00
Makefile PCI: Allow building PCIe things without PCIEPORTBUS 2019-11-21 07:52:33 -06:00
mmap.c
msi.c PCI/MSI: Make arch_.*_msi_irq[s] fallbacks selectable 2020-09-16 16:52:37 +02:00
of.c Merge branch 'pci/doc' 2020-08-05 18:24:22 -05:00
p2pdma.c pci-v5.10-changes 2020-10-22 12:41:00 -07:00
pci-acpi.c PCI/ACPI: Fix companion lookup for device 0 on the root bus 2020-12-11 17:20:36 -06:00
pci-bridge-emul.c PCI: pci-bridge-emul: Export API functions 2020-09-07 14:27:53 +01:00
pci-bridge-emul.h
pci-driver.c PCI: Avoid duplicate IDs in driver dynamic IDs list 2020-11-20 17:23:35 -06:00
pci-label.c PCI: Replace http:// links with https:// 2020-06-30 13:05:09 -05:00
pci-mid.c PCI: intel-mid: Convert to new X86 CPU match macros 2020-03-24 21:35:06 +01:00
pci-pf-stub.c PCI/IOV: Simplify pci-pf-stub with module_pci_driver() 2020-09-17 12:40:20 -05:00
pci-stub.c
pci-sysfs.c Merge branch 'pci/misc' 2020-10-21 09:58:36 -05:00
pci.c PCI: Keep both device and resource name for config space remaps 2020-12-10 15:22:09 -06:00
pci.h PCI: Decode PCIe 64 GT/s link speed 2020-11-20 12:35:27 -06:00
probe.c PCI: Decode PCIe 64 GT/s link speed 2020-11-20 12:35:27 -06:00
proc.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
quirks.c pci-v5.10-changes 2020-10-22 12:41:00 -07:00
remove.c PCI: Fix pci_host_bridge struct device release/free handling 2020-05-14 16:36:35 -05:00
rom.c PCI: Use ioremap(), not phys_to_virt() for platform ROM 2020-03-30 09:52:23 -05:00
search.c Merge branch 'pci/host-vmd' 2020-01-29 17:00:02 -06:00
setup-bus.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
setup-irq.c
setup-res.c PCI: Replace lkml.org, spinics, gmane with lore.kernel.org 2020-06-30 13:05:16 -05:00
slot.c PCI: Fix pci_create_slot() reference count leak 2020-07-10 15:48:22 -05:00
syscall.c
vc.c PCI: Fix kerneldoc warnings 2020-08-05 18:23:14 -05:00
vpd.c
xen-pcifront.c dma-mapping: split <linux/dma-mapping.h> 2020-10-06 07:07:03 +02:00