Add sysctl knob to stop disabling acpi on shutdown.
Approved by: re(jhb)
This commit is contained in:
parent
b6cf3e46b4
commit
c6a78e9840
@ -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,6 +873,8 @@ static void
|
||||
acpi_shutdown_pre_sync(void *arg, int howto)
|
||||
{
|
||||
|
||||
struct acpi_softc *sc = arg;
|
||||
|
||||
ACPI_ASSERTLOCK;
|
||||
|
||||
/*
|
||||
@ -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
|
||||
|
@ -65,6 +65,7 @@ struct acpi_softc {
|
||||
|
||||
int acpi_sleep_delay;
|
||||
int acpi_s4bios;
|
||||
int acpi_disable_on_poweroff;
|
||||
|
||||
int acpi_verbose;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user