summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2024-08-31 16:23:10 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2024-08-31 16:23:10 +0000
commit10ea075bd7ceef71c9d355056b2dfffa340a1ae6 (patch)
tree70063245429b263f931adb92932fb99b9111099b
parent895c5a6c2e7acf1cf7a4260ad61db1f20dec043a (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
-rw-r--r--sys/dev/ic/dc.c9
-rw-r--r--sys/dev/ic/fxp.c9
-rw-r--r--sys/dev/ic/rtl81x9.c9
-rw-r--r--sys/dev/ic/xl.c10
-rw-r--r--sys/dev/pci/if_alc.c9
-rw-r--r--sys/dev/pci/if_ale.c9
-rw-r--r--sys/dev/pci/if_bce.c3
-rw-r--r--sys/dev/pci/if_bge.c9
-rw-r--r--sys/dev/pci/if_em.c10
-rw-r--r--sys/dev/pci/if_ix.c7
-rw-r--r--sys/dev/pci/if_lii.c9
-rw-r--r--sys/dev/pci/if_msk.c8
-rw-r--r--sys/dev/pci/if_nfe.c9
-rw-r--r--sys/dev/pci/if_re_pci.c3
-rw-r--r--sys/dev/pci/if_rge.c9
-rw-r--r--sys/dev/pci/if_se.c10
-rw-r--r--sys/dev/pci/if_sis.c9
-rw-r--r--sys/dev/pci/if_sk.c8
-rw-r--r--sys/dev/pci/if_vr.c9
19 files changed, 36 insertions, 122 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);
}
/*
diff --git a/sys/dev/pci/if_alc.c b/sys/dev/pci/if_alc.c
index 79d809b2381..292ae7c3301 100644
--- a/sys/dev/pci/if_alc.c
+++ b/sys/dev/pci/if_alc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_alc.c,v 1.58 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_alc.c,v 1.59 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2009, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -1465,23 +1465,18 @@ alc_activate(struct device *self, int act)
{
struct alc_softc *sc = (struct alc_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
alc_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
alc_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
diff --git a/sys/dev/pci/if_ale.c b/sys/dev/pci/if_ale.c
index 18c713032fd..1ad8e88d6c2 100644
--- a/sys/dev/pci/if_ale.c
+++ b/sys/dev/pci/if_ale.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ale.c,v 1.51 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_ale.c,v 1.52 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2008, Pyun YongHyeon <yongari@FreeBSD.org>
* All rights reserved.
@@ -583,23 +583,18 @@ ale_activate(struct device *self, int act)
{
struct ale_softc *sc = (struct ale_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
ale_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
ale_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c
index 6f2ee17cb40..7340d8a927e 100644
--- a/sys/dev/pci/if_bce.c
+++ b/sys/dev/pci/if_bce.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bce.c,v 1.56 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_bce.c,v 1.57 2024/08/31 16:23:09 deraadt Exp $ */
/* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */
/*
@@ -445,7 +445,6 @@ bce_activate(struct device *self, int act)
}
break;
}
-
return (0);
}
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index dd6492ba9a7..1fc28a9adbf 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.405 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_bge.c,v 1.406 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -3251,11 +3251,9 @@ bge_activate(struct device *self, int act)
{
struct bge_softc *sc = (struct bge_softc *)self;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
- rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_RUNNING)
bge_stop(sc, 0);
break;
@@ -3263,11 +3261,8 @@ bge_activate(struct device *self, int act)
if (ifp->if_flags & IFF_UP)
bge_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
void
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index e71c604e984..c26699301bb 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.377 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_em.c,v 1.378 2024/08/31 16:23:09 deraadt Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -2076,24 +2076,18 @@ em_activate(struct device *self, int act)
{
struct em_softc *sc = (struct em_softc *)self;
struct ifnet *ifp = &sc->sc_ac.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
em_stop(sc, 0);
- /* We have no children atm, but we will soon */
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
em_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*********************************************************************
diff --git a/sys/dev/pci/if_ix.c b/sys/dev/pci/if_ix.c
index 649380faae0..1c0517d6b0c 100644
--- a/sys/dev/pci/if_ix.c
+++ b/sys/dev/pci/if_ix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ix.c,v 1.215 2024/05/21 11:19:39 bluhm Exp $ */
+/* $OpenBSD: if_ix.c,v 1.216 2024/08/31 16:23:09 deraadt Exp $ */
/******************************************************************************
@@ -401,7 +401,6 @@ ixgbe_activate(struct device *self, int act)
struct ifnet *ifp = &sc->arpcom.ac_if;
struct ixgbe_hw *hw = &sc->hw;
uint32_t ctrl_ext;
- int rv = 0;
switch (act) {
case DVACT_QUIESCE:
@@ -430,10 +429,8 @@ ixgbe_activate(struct device *self, int act)
if (ifp->if_flags & IFF_UP)
ixgbe_init(sc);
break;
- default:
- break;
}
- return (rv);
+ return (0);
}
/*********************************************************************
diff --git a/sys/dev/pci/if_lii.c b/sys/dev/pci/if_lii.c
index 81da9ca4bef..3ab1ef3353b 100644
--- a/sys/dev/pci/if_lii.c
+++ b/sys/dev/pci/if_lii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_lii.c,v 1.47 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_lii.c,v 1.48 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation.
@@ -282,23 +282,18 @@ lii_activate(struct device *self, int act)
{
struct lii_softc *sc = (struct lii_softc *)self;
struct ifnet *ifp = &sc->sc_ac.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
lii_stop(ifp);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
lii_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
diff --git a/sys/dev/pci/if_msk.c b/sys/dev/pci/if_msk.c
index acbcf885673..3822d61d753 100644
--- a/sys/dev/pci/if_msk.c
+++ b/sys/dev/pci/if_msk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_msk.c,v 1.144 2024/05/24 06:02:53 jsg Exp $ */
+/* $OpenBSD: if_msk.c,v 1.145 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1173,7 +1173,6 @@ msk_activate(struct device *self, int act)
{
struct sk_if_softc *sc_if = (void *)self;
struct ifnet *ifp = &sc_if->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_RESUME:
@@ -1181,11 +1180,8 @@ msk_activate(struct device *self, int act)
if (ifp->if_flags & IFF_RUNNING)
msk_init(sc_if);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index 56d5b06b9e2..308c6b2f3c0 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.126 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.127 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -162,23 +162,18 @@ nfe_activate(struct device *self, int act)
{
struct nfe_softc *sc = (struct nfe_softc *)self;
struct ifnet *ifp = &sc->sc_arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
nfe_stop(ifp, 0);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
nfe_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c
index 3f9d61d20d0..62130141857 100644
--- a/sys/dev/pci/if_re_pci.c
+++ b/sys/dev/pci/if_re_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_re_pci.c,v 1.58 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_re_pci.c,v 1.59 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -247,6 +247,5 @@ re_pci_activate(struct device *self, int act)
re_init(ifp);
break;
}
-
return (0);
}
diff --git a/sys/dev/pci/if_rge.c b/sys/dev/pci/if_rge.c
index c30c4c99504..27b19359047 100644
--- a/sys/dev/pci/if_rge.c
+++ b/sys/dev/pci/if_rge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rge.c,v 1.34 2024/08/21 01:22:31 dlg Exp $ */
+/* $OpenBSD: if_rge.c,v 1.35 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 2019, 2020, 2023, 2024
@@ -324,20 +324,15 @@ rge_activate(struct device *self, int act)
#ifndef SMALL_KERNEL
struct rge_softc *sc = (struct rge_softc *)self;
#endif
- int rv = 0;
switch (act) {
case DVACT_POWERDOWN:
- rv = config_activate_children(self, act);
#ifndef SMALL_KERNEL
rge_wol_power(sc);
#endif
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
diff --git a/sys/dev/pci/if_se.c b/sys/dev/pci/if_se.c
index 29b01489055..4a5b40dc58a 100644
--- a/sys/dev/pci/if_se.c
+++ b/sys/dev/pci/if_se.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_se.c,v 1.25 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_se.c,v 1.26 2024/08/31 16:23:09 deraadt Exp $ */
/*-
* Copyright (c) 2009, 2010 Christopher Zimmermann <madroach@zakweb.de>
@@ -732,24 +732,18 @@ se_activate(struct device *self, int act)
{
struct se_softc *sc = (struct se_softc *)self;
struct ifnet *ifp = &sc->sc_ac.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
se_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
(void)se_init(ifp);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
-
- return (rv);
+ return (0);
}
/*
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 696eb62a4f4..e10410840ee 100644
--- a/sys/dev/pci/if_sis.c
+++ b/sys/dev/pci/if_sis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sis.c,v 1.145 2024/05/24 06:02:56 jsg Exp $ */
+/* $OpenBSD: if_sis.c,v 1.146 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1219,23 +1219,18 @@ sis_activate(struct device *self, int act)
{
struct sis_softc *sc = (struct sis_softc *)self;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
sis_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
sis_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index 7b85f1ce978..539f8917c9e 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.197 2024/06/26 01:40:49 jsg Exp $ */
+/* $OpenBSD: if_sk.c,v 1.198 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1126,7 +1126,6 @@ sk_activate(struct device *self, int act)
{
struct sk_if_softc *sc_if = (void *)self;
struct ifnet *ifp = &sc_if->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_RESUME:
@@ -1134,11 +1133,8 @@ sk_activate(struct device *self, int act)
if (ifp->if_flags & IFF_RUNNING)
sk_init(sc_if);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
int
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c
index a2e8bfb2a6e..cae32a8335a 100644
--- a/sys/dev/pci/if_vr.c
+++ b/sys/dev/pci/if_vr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vr.c,v 1.161 2024/05/24 06:02:57 jsg Exp $ */
+/* $OpenBSD: if_vr.c,v 1.162 2024/08/31 16:23:09 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -681,23 +681,18 @@ vr_activate(struct device *self, int act)
{
struct vr_softc *sc = (struct vr_softc *)self;
struct ifnet *ifp = &sc->arpcom.ac_if;
- int rv = 0;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
vr_stop(sc);
- rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
vr_init(sc);
break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (0);
}
/*