Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2012 17:00:34 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236408 - head/sys/dev/acpica
Message-ID:  <201206011700.q51H0YTU031386@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Jun  1 17:00:33 2012
New Revision: 236408
URL: http://svn.freebsd.org/changeset/base/236408

Log:
  Execute AcpiLeaveSleepStatePrep() for S1 and reduce code duplication.
  
  MFC after:	3 days

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Fri Jun  1 16:30:54 2012	(r236407)
+++ head/sys/dev/acpica/acpi.c	Fri Jun  1 17:00:33 2012	(r236408)
@@ -2746,8 +2746,8 @@ acpi_EnterSleepState(struct acpi_softc *
     if (sc->acpi_sleep_delay > 0)
 	DELAY(sc->acpi_sleep_delay * 1000000);
 
+    intr = intr_disable();
     if (state != ACPI_STATE_S1) {
-	intr = intr_disable();
 	sleep_result = acpi_sleep_machdep(sc, state);
 	acpi_wakeup_machdep(sc, state, sleep_result, 0);
 	AcpiLeaveSleepStatePrep(state, acpi_sleep_flags);
@@ -2763,8 +2763,8 @@ acpi_EnterSleepState(struct acpi_softc *
 	if (state == ACPI_STATE_S4)
 	    AcpiEnable();
     } else {
-	intr = intr_disable();
 	status = AcpiEnterSleepState(state, acpi_sleep_flags);
+	AcpiLeaveSleepStatePrep(state, acpi_sleep_flags);
 	intr_restore(intr);
 	if (ACPI_FAILURE(status)) {
 	    device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206011700.q51H0YTU031386>