From bfceafc5979d9055e04f03f970de6ff7a4bce1b6 Mon Sep 17 00:00:00 2001 From: Gary Hade Date: Thu, 5 Jul 2007 11:10:46 -0700 Subject: PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 On systems where the optional _PS3 ACPI object is not implemented acpiphp fails to power off the slot. This is happening because the current code does not attempt to remove power using the _EJ0 ACPI object. This patch restores the _EJ0 evaluation attempt which was apparently inadvertently removed from the power-off sequence when the _EJ0 evaluation code was relocated from power_off_slot() to acpiphp_eject_slot(). Signed-off-by: Gary Hade Cc: Signed-off-by: Kristen Carlson Accardi Signed-off-by: Greg Kroah-Hartman --- drivers/pci/hotplug/acpiphp_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/pci/hotplug/acpiphp_core.c') diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c index fa5c0197d571..a0ca63adad5a 100644 --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c @@ -156,11 +156,15 @@ static int enable_slot(struct hotplug_slot *hotplug_slot) static int disable_slot(struct hotplug_slot *hotplug_slot) { struct slot *slot = hotplug_slot->private; + int retval; dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name); /* disable the specified slot */ - return acpiphp_disable_slot(slot->acpi_slot); + retval = acpiphp_disable_slot(slot->acpi_slot); + if (!retval) + retval = acpiphp_eject_slot(slot->acpi_slot); + return retval; } -- cgit v1.2.3-59-g8ed1b