diff options
author | takawata <takawata@FreeBSD.org> | 2002-12-11 18:48:50 +0000 |
---|---|---|
committer | takawata <takawata@FreeBSD.org> | 2002-12-11 18:48:50 +0000 |
commit | aaf906035b0787569566f6799a8aba464604895c (patch) | |
tree | 9c09c7fdfe0c20ca68a653deda0ef0cc96b70585 /sys/dev/acpica/acpi.c | |
parent | a3d0cd9e0b8ecfc5ed29e3b719aa7caa78c0be27 (diff) | |
download | FreeBSD-src-aaf906035b0787569566f6799a8aba464604895c.zip FreeBSD-src-aaf906035b0787569566f6799a8aba464604895c.tar.gz |
Add sysctl knob to stop disabling acpi on shutdown.
Approved by: re(jhb)
Diffstat (limited to 'sys/dev/acpica/acpi.c')
-rw-r--r-- | sys/dev/acpica/acpi.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 2a6ca65..82b9745 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -427,6 +427,10 @@ acpi_attach(device_t dev) 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"); + SYSCTL_ADD_INT(&sc->acpi_sysctl_ctx, SYSCTL_CHILDREN(sc->acpi_sysctl_tree), + OID_AUTO, "disable_on_poweroff", CTLFLAG_RD | CTLFLAG_RW, + &sc->acpi_disable_on_poweroff, 0, "ACPI subsystem disable on poweroff"); + sc->acpi_disable_on_poweroff = 1; sc->acpi_sleep_delay = 0; sc->acpi_s4bios = 1; if (bootverbose) @@ -869,8 +873,10 @@ static void acpi_shutdown_pre_sync(void *arg, int howto) { + struct acpi_softc *sc = arg; + ACPI_ASSERTLOCK; - + /* * Disable all ACPI events before soft off, otherwise the system * will be turned on again on some laptops. @@ -879,7 +885,8 @@ acpi_shutdown_pre_sync(void *arg, int howto) * before powering down, since we may still need ACPI during the * shutdown process. */ - acpi_Disable((struct acpi_softc *)arg); + if (sc->acpi_disable_on_poweroff) + acpi_Disable(sc); } static void |