Author: spetreolle
Date: Sat Mar 6 23:22:28 2010
New Revision: 45967
URL:
http://svn.reactos.org/svn/reactos?rev=45967&view=rev
Log:
Make the shutdown with ACPI enabled actually work.
Patch by Samuel Serapion.
Modified:
trunk/reactos/drivers/bus/acpi/busmgr/system.c
trunk/reactos/drivers/bus/acpi/power.c
Modified: trunk/reactos/drivers/bus/acpi/busmgr/system.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/busmgr/sy…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/busmgr/system.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/busmgr/system.c [iso-8859-1] Sat Mar 6 23:22:28 2010
@@ -373,15 +373,14 @@
// /* 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_system_restore_state(state);
/* make sure interrupts are enabled */
- //ACPI_ENABLE_IRQS();
+ _enable();
/* reset firmware waking vector */
AcpiSetFirmwareWakingVector((ACPI_PHYSICAL_ADDRESS) 0);
Modified: trunk/reactos/drivers/bus/acpi/power.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/power.c?r…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/power.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/power.c [iso-8859-1] Sat Mar 6 23:22:28 2010
@@ -103,7 +103,7 @@
}
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);