From: Satoru Takeuchi Date: Tue, 12 Sep 2006 17:17:46 +0000 (-0700) Subject: acpiphp: stop bus device before acpi_bus_trim X-Git-Tag: v2.6.19-rc1~1004^2~5 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0dad3510ee82bcf8a380b81a2184a664a911ef9c;p=linux-2.6-omap-h63xx.git acpiphp: stop bus device before acpi_bus_trim Contrary to PCI bridge hot-add, we need to follow the sequence below for PCI bridge hot-removal. (1) Stop devices (detach drivers, remove from the global list, etc.) (2) Unbind ACPI node from the devices (remove the _PRT entries) (3) Remove devices (remove from the device list, etc.) This patch fixes acpiphp driver to follow above sequence for P2P bridge hot-removal. Signed-off-by: Kenji Kaneshige Signed-off-by: MUNEDA Takahiro Signed-off-by: Satoru Takeuchi Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index c1001ad81ad..d36732cd4ba 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -1129,6 +1129,9 @@ static int disable_device(struct acpiphp_slot *slot) func->bridge = NULL; } + if (func->pci_dev) + pci_stop_bus_device(func->pci_dev); + acpiphp_bus_trim(func->handle); /* try to remove anyway. * acpiphp_bus_add might have been failed */