Driver was not calling the child activate functions in the correct way.
authorderaadt <deraadt@openbsd.org>
Sun, 18 Aug 2024 15:09:49 +0000 (15:09 +0000)
committerderaadt <deraadt@openbsd.org>
Sun, 18 Aug 2024 15:09:49 +0000 (15:09 +0000)
There is a child -- wsmouse, which has an activate function, so this
is another oversight...

sys/dev/pckbc/pms.c

index 108d0f7..7756c70 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pms.c,v 1.98 2023/08/16 20:53:47 bru Exp $ */
+/* $OpenBSD: pms.c,v 1.99 2024/08/18 15:09:49 deraadt Exp $ */
 /* $NetBSD: psm.c,v 1.11 2000/06/05 22:20:57 sommerfeld Exp $ */
 
 /*-
@@ -778,9 +778,11 @@ int
 pmsactivate(struct device *self, int act)
 {
        struct pms_softc *sc = (struct pms_softc *)self;
+       int rv;
 
        switch (act) {
        case DVACT_SUSPEND:
+               rv = config_activate_children(self, act);
                if (sc->sc_state == PMS_STATE_ENABLED)
                        pms_change_state(sc, PMS_STATE_SUSPENDED,
                            PMS_DEV_IGNORE);
@@ -789,9 +791,13 @@ pmsactivate(struct device *self, int act)
                if (sc->sc_state == PMS_STATE_SUSPENDED)
                        pms_change_state(sc, PMS_STATE_ENABLED,
                            PMS_DEV_IGNORE);
+               rv = config_activate_children(self, act);
+               break;
+       default:
+               rv = config_activate_children(self, act);
                break;
        }
-       return (0);
+       return (rv);
 }
 
 int