PCI / ACPI: Make acpiphp ignore root bridges using PCIe native hotplug
authorRafael J. Wysocki <rjw@sisk.pl>
Fri, 21 Oct 2011 22:43:38 +0000 (00:43 +0200)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 31 Oct 2011 17:17:43 +0000 (10:17 -0700)
commit0d52f54e2ef64c189dedc332e680b2eb4a34590a
tree638b77454f0abdc808d93628d66c219080fc9e58
parent839d8810747bbf39e0a5a7f223b67bffa7945f8d
PCI / ACPI: Make acpiphp ignore root bridges using PCIe native hotplug

If the kernel has requested control of the PCIe native hotplug
feature for a given root complex, the acpiphp driver should not try
to handle that root complex and it should leave it to pciehp.
Failing to do so causes problems to happen if acpiphp is loaded
before pciehp on such systems.

To address this issue make find_root_bridges() ignore PCIe root
complexes with PCIe native hotplug enabled and make add_bridge()
return error code if PCIe native hotplug is enabled for the given
root port.  This causes acpiphp to refuse to load if PCIe native
hotplug is enabled for all complexes and to refuse binding to
the root complexes with PCIe native hotplug is enabled.

Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/hotplug/acpiphp_glue.c