Skip to content

Commit

Permalink
acpiphp: stop bus device before acpi_bus_trim
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Satoru Takeuchi authored and Greg Kroah-Hartman committed Sep 27, 2006
1 parent 24f8aa9 commit 0dad351
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/pci/hotplug/acpiphp_glue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0dad351

Please sign in to comment.