summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2024-08-02 09:28:36 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2024-08-02 09:28:36 +0000
commit933661d9218cd87ac2f32adceba17f099cdedb2d (patch)
treed235c5e21e95d28ed4ded4b6f6875323f4342a09 /sys/dev/acpi
parent380371e7e15048a10af0fa42fdada5d6bd8c8671 (diff)
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@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r--sys/dev/acpi/acpipwrres.c4
1 files 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 <mpi@openbsd.org>
@@ -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);