Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F3721407
Masterwork From Distant Lands
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
bwidawsk
Sep 14 2018, 6:01 PM
2018-09-14 18:01:02 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
Masterwork From Distant Lands
View Options
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index f55a0048e4b..b25f4348533 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -2727,8 +2727,12 @@ acpi_ReqSleepState(struct acpi_softc *sc, int state)
/* S5 (soft-off) should be entered directly with no waiting. */
if (state == ACPI_STATE_S5) {
+ sc->acpi_sleep_disabled = TRUE;
ACPI_UNLOCK(acpi);
status = acpi_EnterSleepState(sc, state);
+ if (ACPI_FAILURE(status))
+ sc->acpi_sleep_disabled = FALSE;
+
return (ACPI_SUCCESS(status) ? 0 : ENXIO);
}
@@ -2851,18 +2855,15 @@ acpi_sleep_enable(void *arg)
static ACPI_STATUS
acpi_sleep_disable(struct acpi_softc *sc)
{
- ACPI_STATUS status;
-
/* Fail if the system is not fully up and running. */
if (!AcpiGbl_SystemAwakeAndRunning)
return (AE_ERROR);
ACPI_LOCK(acpi);
- status = sc->acpi_sleep_disabled ? AE_ERROR : AE_OK;
sc->acpi_sleep_disabled = TRUE;
ACPI_UNLOCK(acpi);
- return (status);
+ return (AE_OK);
}
enum acpi_sleep_state {
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1554412
Default Alt Text
Masterwork From Distant Lands (1 KB)
Attached To
Mode
P221 Masterwork From Distant Lands
Attached
Detach File
Event Timeline
Log In to Comment