diff options
| author | Aymeric Wibo <obiwac@FreeBSD.org> | 2026-04-16 08:12:33 +0100 |
|---|---|---|
| committer | Aymeric Wibo <obiwac@FreeBSD.org> | 2026-04-19 14:53:59 +0100 |
| commit | 237d5b05f5bb229db96fdafc59e7f504fc3d039a (patch) (diff) | |
| tree | 86d42fdde0438543787b3601892581c55d6137cc | |
| download | src-stable/15.tar.gz | |
| previous commit | fa3958c92e948ce8c59801b5f6b8682585f20bb1 (ixgbe: Fix MRQC register value.) | |
Some ACPI debugging prints call acpi_d_state_to_str() on unset D-states
(i.e. ACPI_STATE_UNKNOWN), so return a string explicitly saying "unknown
D-state" instead of just panicking.
Fixes: 84bbfc32a3f4 ("acpi_powerres: D3cold support")
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
(cherry picked from commit dc9ff9e5d078fd923adc3dc5426b5f219156ea43)
| -rw-r--r-- | sys/dev/acpica/acpivar.h | [diff] [file] | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h index 6887f080311d..ea416402f530 100644 --- a/sys/dev/acpica/acpivar.h +++ b/sys/dev/acpica/acpivar.h @@ -523,6 +523,8 @@ acpi_d_state_to_str(int state) const char *strs[ACPI_D_STATE_COUNT] = {"D0", "D1", "D2", "D3hot", "D3cold"}; + if (state == ACPI_STATE_UNKNOWN) + return ("unknown D-state"); MPASS(state >= ACPI_STATE_D0 && state <= ACPI_D_STATES_MAX); return (strs[state]); } |
