diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-08-31 16:23:10 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2024-08-31 16:23:10 +0000 |
commit | 10ea075bd7ceef71c9d355056b2dfffa340a1ae6 (patch) | |
tree | 70063245429b263f931adb92932fb99b9111099b /sys/dev/ic | |
parent | 895c5a6c2e7acf1cf7a4260ad61db1f20dec043a (diff) |
net drivers may have mii children, but mii layer has no _activate
functions. similar operations are done via driver xx_stop/init functions
calling mii_ subfunctions directly at the right moments in time, and
are not anticipated to ever need the activate mechanism. so for now,
delete all the config_activate_children() here
ok kettenis
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/dc.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/fxp.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/rtl81x9.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/xl.c | 10 |
4 files changed, 8 insertions, 29 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index ac61bf773ad..c60c1c326a2 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.157 2024/05/13 01:15:50 jsg Exp $ */ +/* $OpenBSD: dc.c,v 1.158 2024/08/31 16:23:09 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -3061,23 +3061,18 @@ dc_activate(struct device *self, int act) { struct dc_softc *sc = (struct dc_softc *)self; struct ifnet *ifp = &sc->sc_arpcom.ac_if; - int rv = 0; switch (act) { case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) dc_stop(sc, 0); - rv = config_activate_children(self, act); break; case DVACT_RESUME: if (ifp->if_flags & IFF_UP) dc_init(sc); break; - default: - rv = config_activate_children(self, act); - break; } - return (rv); + return (0); } int diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 02097de9e60..fde5d6a4f03 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.134 2024/02/28 12:53:31 miod Exp $ */ +/* $OpenBSD: fxp.c,v 1.135 2024/08/31 16:23:09 deraadt Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -284,23 +284,18 @@ fxp_activate(struct device *self, int act) { struct fxp_softc *sc = (struct fxp_softc *)self; struct ifnet *ifp = &sc->sc_arpcom.ac_if; - int rv = 0; switch (act) { case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) fxp_stop(sc, 1, 0); - rv = config_activate_children(self, act); break; case DVACT_WAKEUP: if (ifp->if_flags & IFF_UP) fxp_wakeup(sc); break; - default: - rv = config_activate_children(self, act); - break; } - return (rv); + return (0); } void diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c index fa642d3617b..6beca05a8e5 100644 --- a/sys/dev/ic/rtl81x9.c +++ b/sys/dev/ic/rtl81x9.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtl81x9.c,v 1.98 2020/07/10 13:26:37 patrick Exp $ */ +/* $OpenBSD: rtl81x9.c,v 1.99 2024/08/31 16:23:09 deraadt Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1222,23 +1222,18 @@ rl_activate(struct device *self, int act) { struct rl_softc *sc = (struct rl_softc *)self; struct ifnet *ifp = &sc->sc_arpcom.ac_if; - int rv = 0; switch (act) { case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) rl_stop(sc); - rv = config_activate_children(self, act); break; case DVACT_RESUME: if (ifp->if_flags & IFF_UP) rl_init(sc); break; - default: - rv = config_activate_children(self, act); - break; } - return (rv); + return (0); } int diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c index 22129f48261..dbeaeb76acf 100644 --- a/sys/dev/ic/xl.c +++ b/sys/dev/ic/xl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xl.c,v 1.139 2023/11/10 15:51:20 bluhm Exp $ */ +/* $OpenBSD: xl.c,v 1.140 2024/08/31 16:23:09 deraadt Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -188,29 +188,23 @@ xl_activate(struct device *self, int act) { struct xl_softc *sc = (struct xl_softc *)self; struct ifnet *ifp = &sc->sc_arpcom.ac_if; - int rv = 0; switch (act) { case DVACT_SUSPEND: if (ifp->if_flags & IFF_RUNNING) xl_stop(sc); - rv = config_activate_children(self, act); break; case DVACT_RESUME: if (ifp->if_flags & IFF_UP) xl_init(sc); break; case DVACT_POWERDOWN: - rv = config_activate_children(self, act); #ifndef SMALL_KERNEL xl_wol_power(sc); #endif break; - default: - rv = config_activate_children(self, act); - break; } - return (rv); + return (0); } /* |