Add a couple of minor changes.
- set sc->acpi_s4bios to 1 by default for hibernation until OS-initiated S4 transition is implemented. - change the behavior of acpi_sleep_state_sysctl() if new value is the same as old one, do nothing instead of EINVAL.
This commit is contained in:
parent
24373ce6ed
commit
931a10c9d2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=87134
@ -414,6 +414,7 @@ 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");
|
||||
sc->acpi_s4bios = 1;
|
||||
if (bootverbose)
|
||||
sc->acpi_verbose = 1;
|
||||
|
||||
@ -1758,8 +1759,10 @@ acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS)
|
||||
sizeof(sleep_state)) == 0)
|
||||
break;
|
||||
}
|
||||
if ((new_state != old_state) && (new_state <= ACPI_S_STATES_MAX+1)) {
|
||||
*(u_int *)oidp->oid_arg1 = new_state;
|
||||
if (new_state <= ACPI_S_STATES_MAX+1) {
|
||||
if (new_state != old_state) {
|
||||
*(u_int *)oidp->oid_arg1 = new_state;
|
||||
}
|
||||
} else {
|
||||
error = EINVAL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user