Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Aug 2018 08:58:33 +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-11@freebsd.org
Subject:   svn commit: r337117 - stable/11/sys/dev/acpica
Message-ID:  <201808020858.w728wXSE062467@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Thu Aug  2 08:58:33 2018
New Revision: 337117
URL: https://svnweb.freebsd.org/changeset/base/337117

Log:
  MFC r334479: call AcpiLeaveSleepStatePrep after re-enabling interrupts

Modified:
  stable/11/sys/dev/acpica/acpi.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/acpica/acpi.c
==============================================================================
--- stable/11/sys/dev/acpica/acpi.c	Thu Aug  2 08:57:40 2018	(r337116)
+++ stable/11/sys/dev/acpica/acpi.c	Thu Aug  2 08:58:33 2018	(r337117)
@@ -2928,8 +2928,6 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state)
 	if (sleep_result == 1 && state != ACPI_STATE_S4)
 	    AcpiWriteBitRegister(ACPI_BITREG_SCI_ENABLE, ACPI_ENABLE_EVENT);
 
-	AcpiLeaveSleepStatePrep(state);
-
 	if (sleep_result == 1 && state == ACPI_STATE_S3) {
 	    /*
 	     * Prevent mis-interpretation of the wakeup by power button
@@ -2958,6 +2956,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state)
 	/* call acpi_wakeup_machdep() again with interrupt enabled */
 	acpi_wakeup_machdep(sc, state, sleep_result, 1);
 
+	AcpiLeaveSleepStatePrep(state);
+
 	if (sleep_result == -1)
 		goto backout;
 
@@ -2966,8 +2966,8 @@ acpi_EnterSleepState(struct acpi_softc *sc, int state)
 	    AcpiEnable();
     } else {
 	status = AcpiEnterSleepState(state);
-	AcpiLeaveSleepStatePrep(state);
 	intr_restore(intr);
+	AcpiLeaveSleepStatePrep(state);
 	if (ACPI_FAILURE(status)) {
 	    device_printf(sc->acpi_dev, "AcpiEnterSleepState failed - %s\n",
 			  AcpiFormatException(status));



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