From: kettenis Date: Fri, 2 Aug 2024 09:28:35 +0000 (+0000) Subject: Switch off unreferenced power resources in DVACT_POWERDOWN instead of X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ce3373263d9dc90c389770245bfb2f9edf4f9f31;p=openbsd Switch off unreferenced power resources in DVACT_POWERDOWN instead of DVACT_SUSPEND. Fixes an issue with (un)hibernate where we don't attach xhci(4) controllers, which would make is turn the xhci(4) off inadvertedly because its power resource wasn't referenced. ok mlarkin@ --- diff --git a/sys/dev/acpi/acpipwrres.c b/sys/dev/acpi/acpipwrres.c index 05e1a09d14b..0955c62ed8f 100644 --- a/sys/dev/acpi/acpipwrres.c +++ b/sys/dev/acpi/acpipwrres.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpipwrres.c,v 1.14 2024/07/14 10:48:55 kettenis Exp $ */ +/* $OpenBSD: acpipwrres.c,v 1.15 2024/08/02 09:28:35 kettenis Exp $ */ /* * Copyright (c) 2013 Martin Pieuchot @@ -148,7 +148,7 @@ acpipwrres_activate(struct device *self, int act) struct acpipwrres_softc *sc = (struct acpipwrres_softc *)self; switch (act) { - case DVACT_SUSPEND: + case DVACT_POWERDOWN: if (sc->sc_cons_ref == 0 && sc->sc_state != ACPIPWRRES_OFF) { aml_evalname(sc->sc_acpi, sc->sc_devnode, "_OFF", 0, NULL, NULL);