summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/acpica/acpi.c8
-rw-r--r--sys/dev/acpica/acpivar.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
index 0b0e157..d8657d8 100644
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -417,11 +417,15 @@ acpi_attach(device_t dev)
OID_AUTO, "suspend_state", CTLTYPE_STRING | CTLFLAG_RW,
&sc->acpi_suspend_sx, 0, acpi_sleep_state_sysctl, "A", "");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
+ OID_AUTO, "sleep_delay", CTLFLAG_RD | CTLFLAG_RW,
+ &sc->acpi_sleep_delay, 0, "sleep delay");
+ SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
OID_AUTO, "s4bios", CTLFLAG_RD | CTLFLAG_RW,
&sc->acpi_s4bios, 0, "S4BIOS mode");
SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree),
OID_AUTO, "verbose", CTLFLAG_RD | CTLFLAG_RW,
&sc->acpi_verbose, 0, "verbose mode");
+ sc->acpi_sleep_delay = 1;
sc->acpi_s4bios = 1;
if (bootverbose)
sc->acpi_verbose = 1;
@@ -1357,6 +1361,10 @@ acpi_SetSleepState(struct acpi_softc *sc, int state)
break;
}
+ if (sc->acpi_sleep_delay > 0) {
+ DELAY(sc->acpi_sleep_delay * 1000000);
+ }
+
if (state != ACPI_STATE_S1) {
acpi_sleep_machdep(sc, state);
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
index 88c462e..ae94b05 100644
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -59,6 +59,7 @@ struct acpi_softc {
int acpi_standby_sx;
int acpi_suspend_sx;
+ int acpi_sleep_delay;
int acpi_s4bios;
int acpi_verbose;
OpenPOWER on IntegriCloud