RE: [PATCH] Clear WAK_STS on resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey, why not:

/*
 * 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.
 */
 acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);

>-----Original Message-----
>From: linux-acpi-owner@xxxxxxxxxxxxxxx [mailto:linux-acpi-
>owner@xxxxxxxxxxxxxxx] On Behalf Of Matthew Garrett
>Sent: Wednesday, August 06, 2008 10:58 AM
>To: linux-acpi@xxxxxxxxxxxxxxx
>Cc: Brown, Len; pavel@xxxxxxx; rjw@xxxxxxx; ak@xxxxxxxxxxxxxxx
>Subject: [PATCH] Clear WAK_STS on resume
>
>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.
>
>Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>
>
>---
>
>I've had it confirmed by AMI that some of their BIOSes make this
>assumption - there may well be others out there as well.
>
>diff --git a/drivers/acpi/hardware/hwsleep.c
>b/drivers/acpi/hardware/hwsleep.c
>index dba3cfb..1cda856 100644
>--- a/drivers/acpi/hardware/hwsleep.c
>+++ b/drivers/acpi/hardware/hwsleep.c
>@@ -627,6 +627,9 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
> 	}
> 	/* TBD: _WAK "sometimes" returns stuff - do we want to look at
it? */
>
>+	/* Clear wake status */
>+	acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
>+
> 	acpi_gbl_system_awake_and_running = TRUE;
>
> 	/* Enable power button */
>
>--
>Matthew Garrett | mjg59@xxxxxxxxxxxxx
>--
>To unsubscribe from this list: send the line "unsubscribe linux-acpi"
in
>the body of a message to majordomo@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux