diff options
author | Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> | 2006-09-12 13:17:46 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-09-26 20:43:54 -0400 |
commit | 0dad3510ee82bcf8a380b81a2184a664a911ef9c (patch) | |
tree | 57a721d57a7cd896a5742730b3d8db04d8568752 | |
parent | 24f8aa9b464b73e0553f092b747770940ee0ea54 (diff) |
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 <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: MUNEDA Takahiro <muneda.takahiro@jp.fujitsu.com>
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index c1001ad81ad4..d36732cd4bad 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) | |||
1129 | func->bridge = NULL; | 1129 | func->bridge = NULL; |
1130 | } | 1130 | } |
1131 | 1131 | ||
1132 | if (func->pci_dev) | ||
1133 | pci_stop_bus_device(func->pci_dev); | ||
1134 | |||
1132 | acpiphp_bus_trim(func->handle); | 1135 | acpiphp_bus_trim(func->handle); |
1133 | /* try to remove anyway. | 1136 | /* try to remove anyway. |
1134 | * acpiphp_bus_add might have been failed */ | 1137 | * acpiphp_bus_add might have been failed */ |