aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-15 18:12:09 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-02-15 18:12:09 -0500
commitcc6254e00eb676dda6501655f8185aef7b761b4f (patch)
tree715f7e1f038b6ee6540e61776b5d54c7a5c0fcce
parent3799c5a032aefb258e2a19dfdb1e3780b78ee3ad (diff)
ACPI / hotplug / PCI: Add ACPIPHP contexts to devices handled by PCIeHP
Currently, ACPIPHP does not add hotplug context to devices that should be handled by the native PCI hotplug (PCIeHP) code. The reason why was because PCIeHP didn't know about the devices' connections with ACPI and would not clean up things properly during an eject of an ACPI-backed device, for example. However, after recent changes that made the ACPI core create struct acpi_device objects for all namespace nodes regardless of the underlying devices' status and added PCI rescan-remove locking to both ACPIPHP and PCIeHP, that concern is not valid any more. Namely, after those changes PCIeHP need not care about the ACPI side of things any more and it should be serialized with respect to ACPIPHP and they won't be running concurrently with each other in any case. For this reason, make ACPIPHP to add its hotplug context to all devices with ACPI companions, even the ones that should be handled by PCIeHP in principle. That may work around hotplug issues on some systems where PCIeHP is supposed to work, but it doesn't and the ACPI hotplug signaling works instead. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 903af4d4a383..f2f460cba5f7 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -277,9 +277,6 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
277 struct pci_dev *pdev = bridge->pci_dev; 277 struct pci_dev *pdev = bridge->pci_dev;
278 u32 val; 278 u32 val;
279 279
280 if (pdev && device_is_managed_by_native_pciehp(pdev))
281 return AE_OK;
282
283 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr); 280 status = acpi_evaluate_integer(handle, "_ADR", NULL, &adr);
284 if (ACPI_FAILURE(status)) { 281 if (ACPI_FAILURE(status)) {
285 if (status != AE_NOT_FOUND) 282 if (status != AE_NOT_FOUND)
@@ -338,8 +335,14 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
338 335
339 list_add_tail(&slot->node, &bridge->slots); 336 list_add_tail(&slot->node, &bridge->slots);
340 337
341 /* Register slots for ejectable functions only. */ 338 /*
342 if (acpi_pci_check_ejectable(pbus, handle) || is_dock_device(handle)) { 339 * Expose slots to user space for functions that have _EJ0 or _RMV or
340 * are located in dock stations. Do not expose them for devices handled
341 * by the native PCIe hotplug (PCIeHP), becuase that code is supposed to
342 * expose slots to user space in those cases.
343 */
344 if ((acpi_pci_check_ejectable(pbus, handle) || is_dock_device(handle))
345 && !(pdev && device_is_managed_by_native_pciehp(pdev))) {
343 unsigned long long sun; 346 unsigned long long sun;
344 int retval; 347 int retval;
345 348