]> asedeno.scripts.mit.edu Git - linux.git/commit
PCI: pciehp: Make pciehp_is_native() stricter
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 23 May 2018 22:24:08 +0000 (17:24 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 2 Jun 2018 05:18:28 +0000 (00:18 -0500)
commit5352a44a561d708f1a975a90f5ce16a054fe265c
treece141dc89652f25a3288ea4069563ee9b9b18f41
parent9310f0dc1c6430ca9e370a8341bea9f5dc85f40b
PCI: pciehp: Make pciehp_is_native() stricter

Previously pciehp_is_native() returned true for any PCI device in a
hierarchy where _OSC says we can use pciehp.  This is incorrect because
bridges without PCI_EXP_SLTCAP_HPC capability should be managed by acpiphp
instead.

Improve pciehp_is_native() to return true only when PCI_EXP_SLTCAP_HPC is
set and the pciehp driver is present.  In any other case return false
to let acpiphp handle those.

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[bhelgaas: remove NULL pointer check]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/pci/pci-acpi.c
drivers/pci/pcie/portdrv.h
include/linux/pci.h
include/linux/pci_hotplug.h