From ea05d060d200e3b3c0cc54eab5d48fb53a7250b8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 20 Aug 2024 16:24:50 +0000 Subject: [PATCH] match the config_activate_children() sequences found in other usb host controller drivers. --- sys/arch/armv7/omap/omehci.c | 8 ++++++-- sys/arch/armv7/omap/omohci.c | 10 ++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/sys/arch/armv7/omap/omehci.c b/sys/arch/armv7/omap/omehci.c index 53eb107326c..710a8c0aec9 100644 --- a/sys/arch/armv7/omap/omehci.c +++ b/sys/arch/armv7/omap/omehci.c @@ -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 @@ -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; } diff --git a/sys/arch/armv7/omap/omohci.c b/sys/arch/armv7/omap/omohci.c index c00c1288e6a..ee5ad4761c6 100644 --- a/sys/arch/armv7/omap/omohci.c +++ b/sys/arch/armv7/omap/omohci.c @@ -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 @@ -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 -- 2.20.1