Make the shutdown with ACPI enabled actually work.

Patch by Samuel Serapion.

svn path=/trunk/; revision=45967
This commit is contained in:
Sylvain Petreolle 2010-03-06 22:22:28 +00:00
parent 77013ae0dd
commit 8eca3e0dcd
2 changed files with 4 additions and 5 deletions

View file

@ -373,15 +373,14 @@ acpi_suspend (
// /* We don't support S4 under 2.4. Give up */
// return AE_ERROR;
//}
AcpiEnterSleepStatePrep(state);
status = AcpiEnterSleepState(state);
if (!ACPI_SUCCESS(status) && state != ACPI_STATE_S5)
return status;
AcpiEnterSleepStatePrep(state);
/* disable interrupts and flush caches */
//ACPI_DISABLE_IRQS();
_disable();
ACPI_FLUSH_CPU_CACHE();
/* perform OS-specific sleep actions */
@ -395,7 +394,7 @@ acpi_suspend (
acpi_system_restore_state(state);
/* make sure interrupts are enabled */
//ACPI_ENABLE_IRQS();
_enable();
/* reset firmware waking vector */
AcpiSetFirmwareWakingVector((ACPI_PHYSICAL_ADDRESS) 0);

View file

@ -103,7 +103,7 @@ Bus_FDO_Power (
}
oldPowerState = Data->Common.SystemPowerState;
Data->Common.SystemPowerState = powerState.SystemState;
AcpiStatus = AcpiEnterSleepState(AcpiState);
AcpiStatus = acpi_suspend(AcpiState);
if (!ACPI_SUCCESS(AcpiStatus)) {
DPRINT1("Failed to enter sleep state %d (Status 0x%X)\n",
AcpiState, AcpiStatus);