summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2010-08-31 16:25:28 +0000
committerderaadt <deraadt@openbsd.org>2010-08-31 16:25:28 +0000
commitb7fbe3450ed762b285e10d81b234956fab571700 (patch)
treea28323d7cf317eba37db554722dcf488d5ccf9b1
parentactivate functions should not return EOPNOTSUPP (diff)
downloadwireguard-openbsd-b7fbe3450ed762b285e10d81b234956fab571700.tar.xz
wireguard-openbsd-b7fbe3450ed762b285e10d81b234956fab571700.zip
activate function should return result of config_activate_children
-rw-r--r--sys/dev/ic/fxp.c9
-rw-r--r--sys/dev/ic/xl.c9
-rw-r--r--sys/dev/isa/pckbc_isa.c9
-rw-r--r--sys/dev/pci/if_bge.c9
-rw-r--r--sys/dev/pci/if_nfe.c9
-rw-r--r--sys/dev/pci/if_sis.c9
-rw-r--r--sys/dev/sdmmc/sdhc.c10
7 files changed, 35 insertions, 29 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 415531efa63..8cbb5f45dfa 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.103 2010/08/27 18:25:47 deraadt Exp $ */
+/* $OpenBSD: fxp.c,v 1.104 2010/08/31 16:29:10 deraadt Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -294,21 +294,22 @@ 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;
switch (act) {
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
fxp_stop(sc, 1, 0);
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_UP)
workq_queue_task(NULL, &sc->sc_resume_wqt, 0,
fxp_resume, sc, NULL);
break;
}
- return 0;
+ return (rv);
}
void
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 751501f438d..2be0cce4e09 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.92 2010/08/27 15:43:41 deraadt Exp $ */
+/* $OpenBSD: xl.c,v 1.93 2010/08/31 16:29:56 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -200,6 +200,7 @@ 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;
switch (act) {
case DVACT_SUSPEND:
@@ -207,16 +208,16 @@ xl_activate(struct device *self, int act)
xl_reset(sc);
xl_stop(sc);
}
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
xl_reset(sc);
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_UP)
xl_init(sc);
break;
}
- return (0);
+ return (rv);
}
void
diff --git a/sys/dev/isa/pckbc_isa.c b/sys/dev/isa/pckbc_isa.c
index 130dba6e477..cedd2131f74 100644
--- a/sys/dev/isa/pckbc_isa.c
+++ b/sys/dev/isa/pckbc_isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pckbc_isa.c,v 1.8 2010/08/28 12:47:12 miod Exp $ */
+/* $OpenBSD: pckbc_isa.c,v 1.9 2010/08/31 16:31:00 deraadt Exp $ */
/* $NetBSD: pckbc_isa.c,v 1.2 2000/03/23 07:01:35 thorpej Exp $ */
/*
@@ -111,17 +111,18 @@ int
pckbc_isa_activate(struct device *self, int act)
{
struct pckbc_isa_softc *isc = (struct pckbc_isa_softc *)self;
+ int rv = 0;
switch (act) {
case DVACT_SUSPEND:
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
pckbc_reset(&isc->sc_pckbc);
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
}
- return (0);
+ return (rv);
}
void
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index b6d90cadb7a..53ca5156013 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.299 2010/08/27 19:48:14 deraadt Exp $ */
+/* $OpenBSD: if_bge.c,v 1.300 2010/08/31 16:27:36 deraadt Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -2293,20 +2293,21 @@ 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:
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_RUNNING)
bge_stop(sc);
break;
case DVACT_RESUME:
if (ifp->if_flags & IFF_UP)
bge_init(sc);
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
}
- return (0);
+ return (rv);
}
void
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index b3a7303fa0b..c1920c0593f 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.93 2010/08/27 19:56:23 deraadt Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.94 2010/08/31 16:27:09 deraadt Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -179,20 +179,21 @@ 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);
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_UP)
nfe_init(ifp);
break;
}
- return (0);
+ return (rv);
}
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 2d80c46805a..7069bee550f 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.99 2010/08/06 05:24:16 deraadt Exp $ */
+/* $OpenBSD: if_sis.c,v 1.100 2010/08/31 16:26:19 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1158,20 +1158,21 @@ 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);
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
- config_activate_children(self, act);
+ rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_UP)
sis_init(sc);
break;
}
- return (0);
+ return (rv);
}
/*
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c
index d09d613cf89..e2704bb6547 100644
--- a/sys/dev/sdmmc/sdhc.c
+++ b/sys/dev/sdmmc/sdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc.c,v 1.30 2010/08/27 15:41:43 deraadt Exp $ */
+/* $OpenBSD: sdhc.c,v 1.31 2010/08/31 16:25:28 deraadt Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -253,7 +253,7 @@ sdhc_activate(struct device *self, int act)
{
struct sdhc_softc *sc = (struct sdhc_softc *)self;
struct sdhc_host *hp;
- int n, i;
+ int n, i, rv = 0;
switch (act) {
case DVACT_SUSPEND:
@@ -266,7 +266,7 @@ sdhc_activate(struct device *self, int act)
for (i = 0; i < sizeof hp->regs; i++)
hp->regs[i] = HREAD1(hp, i);
}
- config_activate_children((struct device *)sc, act);
+ rv = config_activate_children(self, act);
break;
case DVACT_RESUME:
/* Restore the host controller state. */
@@ -276,10 +276,10 @@ sdhc_activate(struct device *self, int act)
for (i = 0; i < sizeof hp->regs; i++)
HWRITE1(hp, i, hp->regs[i]);
}
- config_activate_children((struct device *)sc, act);
+ rv = config_activate_children(self, act);
break;
}
- return (0);
+ return (rv);
}
void