From 8b7f340bf528d7b8dc4c0d6c9a0149e5a68e22fd Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 18 Aug 2024 14:35:14 +0000 Subject: [PATCH] there are azalia that will fail to attach. in the activate function for DVACT_QUIESCE, this was handled by doing nothing. however, the other DVACT methods were still trying to touch the device. This needs to bail out earlier. ok ratchov --- sys/dev/pci/azalia.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index 97bd1de3874..c1731e556b5 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.288 2024/08/13 22:32:58 deraadt Exp $ */ +/* $OpenBSD: azalia.c,v 1.289 2024/08/18 14:35:14 deraadt Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -598,13 +598,12 @@ azalia_pci_activate(struct device *self, int act) azalia_t *sc = (azalia_t*)self; int rv = 0; + if (sc->detached) + return (0); + switch (act) { case DVACT_QUIESCE: rv = config_activate_children(self, act); - - if (sc->detached) - break; - /* stop interrupts and clear status registers */ AZ_WRITE_4(sc, INTCTL, 0); AZ_WRITE_2(sc, STATESTS, HDA_STATESTS_SDIWAKE); -- 2.20.1