From ce3373263d9dc90c389770245bfb2f9edf4f9f31 Mon Sep 17 00:00:00 2001 From: kettenis Date: Fri, 2 Aug 2024 09:28:35 +0000 Subject: [PATCH] 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@ --- sys/dev/acpi/acpipwrres.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.20.1