match the config_activate_children() sequences found in other usb host
authorderaadt <deraadt@openbsd.org>
Tue, 20 Aug 2024 16:24:50 +0000 (16:24 +0000)
committerderaadt <deraadt@openbsd.org>
Tue, 20 Aug 2024 16:24:50 +0000 (16:24 +0000)
controller drivers.

sys/arch/armv7/omap/omehci.c
sys/arch/armv7/omap/omohci.c

index 53eb107..710a8c0 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: omehci.c,v 1.10 2024/05/13 01:15:50 jsg Exp $ */
+/*     $OpenBSD: omehci.c,v 1.11 2024/08/20 16:24:50 deraadt Exp $ */
 
 /*
  * Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -449,9 +449,11 @@ int
 omehci_activate(struct device *self, int act)
 {
        struct omehci_softc *sc = (struct omehci_softc *)self;
+       int rv;
 
        switch (act) {
        case DVACT_SUSPEND:
+               rv = config_activate_children(self, act);
                sc->sc.sc_bus.use_polling++;
                /* FIXME */
                sc->sc.sc_bus.use_polling--;
@@ -460,10 +462,12 @@ omehci_activate(struct device *self, int act)
                sc->sc.sc_bus.use_polling++;
                /* FIXME */
                sc->sc.sc_bus.use_polling--;
+               rv = config_activate_children(self, act);
                break;
        case DVACT_POWERDOWN:
+               rv = config_activate_children(self, act);
                ehci_reset(&sc->sc);
                break;
        }
-       return 0;
+       return rv;
 }
index c00c128..ee5ad47 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: omohci.c,v 1.4 2021/10/24 17:52:28 mpi Exp $ */
+/*     $OpenBSD: omohci.c,v 1.5 2024/08/20 16:24:50 deraadt Exp $ */
 
 /*
  * Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -271,6 +271,7 @@ int
 omohci_activate(struct device *self, int act)
 {
        struct omohci_softc *sc = (struct omohci_softc *)self;
+       int rv;
 
        switch (act) {
        case DVACT_SUSPEND:
@@ -280,9 +281,11 @@ omohci_activate(struct device *self, int act)
                pxa2x0_clkman_config(CKEN_USBHC, 0);
 #endif
                sc->sc.sc_bus.use_polling--;
+               rv = config_activate_children(self, act);
                break;
 
        case DVACT_RESUME:
+               rv = config_activate_children(self, act);
                sc->sc.sc_bus.use_polling++;
 #if 0
                pxa2x0_clkman_config(CKEN_USBHC, 1);
@@ -291,8 +294,11 @@ omohci_activate(struct device *self, int act)
                ohci_power(why, &sc->sc);
                sc->sc.sc_bus.use_polling--;
                break;
+       default:
+               rv = config_activate_children(self, act);
+               break;
        }
-       return 0;
+       return rv;
 }
 
 void