aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Certner <olce@FreeBSD.org>2026-05-04 19:49:32 +0000
committerOlivier Certner <olce@FreeBSD.org>2026-05-13 12:38:23 +0000
commit5ba100a35cc5999d86a975fea9383d279f12e177 (patch)
tree957d9699a69de599e70fe07912fdae4dae3039d4
parentee13d62417f28ee22331ab81ecac2ed3457ea1e1 (diff)
acpi_spmc(4): Global message on constraints parsing failure
...in order to indicate to users that power state constraints will not be checked at all. Reviewed by: imp, obiwac Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D56816
-rw-r--r--sys/dev/acpica/acpi_spmc.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c
index 5aed9ad3e5e4..751b4c8f0641 100644
--- a/sys/dev/acpica/acpi_spmc.c
+++ b/sys/dev/acpica/acpi_spmc.c
@@ -367,6 +367,7 @@ acpi_spmc_attach(device_t dev)
struct acpi_spmc_softc *const sc = device_get_softc(dev);
const ACPI_HANDLE handle = acpi_get_handle(dev);
char buf[32];
+ int error;
/*
* ACPI_ID_PROBE() in acpi_spmc_probe() cannot succeed without a handle.
@@ -399,7 +400,12 @@ acpi_spmc_attach(device_t dev)
acpi_spmc_dsm_print_functions(sc, dsms[i]);
/* Get device constraints. We can only call this once so do this now. */
- acpi_spmc_get_constraints(sc);
+ error = acpi_spmc_get_constraints(sc);
+ if (error != 0)
+ /* acpi_spmc_get_constraints() takes care of cleaning up. */
+ device_printf(dev,
+ "Could not parse power state constraints (%d), "
+ "will not check for them before suspend\n", error);
sc->eh_suspend = EVENTHANDLER_REGISTER(acpi_post_dev_suspend,
acpi_spmc_suspend, dev, 0);