The branch main has been updated by olce:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=5ba100a35cc5999d86a975fea9383d279f12e177

commit 5ba100a35cc5999d86a975fea9383d279f12e177
Author:     Olivier Certner <[email protected]>
AuthorDate: 2026-05-04 19:49:32 +0000
Commit:     Olivier Certner <[email protected]>
CommitDate: 2026-05-13 12:38:23 +0000

    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
---
 sys/dev/acpica/acpi_spmc.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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);

Reply via email to