Date: Wed, 6 Mar 2013 10:45:46 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r247883 - stable/9/sys/dev/acpica Message-ID: <201303061045.r26Ajkaa078840@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Wed Mar 6 10:45:46 2013 New Revision: 247883 URL: http://svnweb.freebsd.org/changeset/base/247883 Log: MFC r246250,246252: acpi: after wakeup from a state > S1 re-enable SCI_EN with a direct write Modified: stable/9/sys/dev/acpica/acpi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Wed Mar 6 10:40:50 2013 (r247882) +++ stable/9/sys/dev/acpica/acpi.c Wed Mar 6 10:45:46 2013 (r247883) @@ -2742,6 +2742,19 @@ acpi_EnterSleepState(struct acpi_softc * if (state != ACPI_STATE_S1) { sleep_result = acpi_sleep_machdep(sc, state); acpi_wakeup_machdep(sc, state, sleep_result, 0); + + /* + * XXX According to ACPI specification SCI_EN bit should be restored + * by ACPI platform (BIOS, firmware) to its pre-sleep state. + * Unfortunately some BIOSes fail to do that and that leads to + * unexpected and serious consequences during wake up like a system + * getting stuck in SMI handlers. + * This hack is picked up from Linux, which claims that it follows + * Windows behavior. + */ + if (sleep_result == 1 && state != ACPI_STATE_S4) + AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, ACPI_ENABLE_EVENT); + intr_restore(intr); /* call acpi_wakeup_machdep() again with interrupt enabled */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303061045.r26Ajkaa078840>