Skip to content

Commit

Permalink
ACPI: Clear WAK_STS on resume
Browse files Browse the repository at this point in the history
The leading other brand OS appears to clear the WAK_STS flag on resume.
When rebooted, certain BIOSes assume that the system is actually
resuming if it's still set and so fail to reboot correctly. Make sure
that it's cleared at resume time.

Comment clarified as suggested by Bob Moore

http://bugzilla.kernel.org/show_bug.cgi?id=11634

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Romano Giannetti <romano.giannetti@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Matthew Garrett authored and Len Brown committed Oct 16, 2008
1 parent 3fa8749 commit a68823e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/acpi/hardware/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,13 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
}
/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */

/*
* Some BIOSes assume that WAK_STS will be cleared on resume and use
* it to determine whether the system is rebooting or resuming. Clear
* it for compatibility.
*/
acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);

acpi_gbl_system_awake_and_running = TRUE;

/* Enable power button */
Expand Down

0 comments on commit a68823e

Please sign in to comment.