summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2013-12-06 21:03:06 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2013-12-06 21:03:06 +0000
commitdde7b00df07d5064317db5ff355091c989d5d684 (patch)
tree7ea38e550451394317b7581ff5f8914bd269ec95 /sys/dev/ic
parent236f5968eef75c8e14b0b020bb15cc2f53b5041e (diff)
Add a DVACT_WAKEUP op to the *_activate() API. This is called after the
kernel resumes normal (non-cold, able to run processes, etc) operation. Previously we were relying on specific DVACT_RESUME op's in drivers creating callback/threads themselves, but that has become too common, indicating the need for a built-in mechanism. ok dlg kettenis, tested by a sufficient amount of people
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/ahci.c25
-rw-r--r--sys/dev/ic/athn.c4
-rw-r--r--sys/dev/ic/athnvar.h4
-rw-r--r--sys/dev/ic/atw.c11
-rw-r--r--sys/dev/ic/atwvar.h7
-rw-r--r--sys/dev/ic/bwi.c3
-rw-r--r--sys/dev/ic/bwivar.h3
-rw-r--r--sys/dev/ic/dc.c8
-rw-r--r--sys/dev/ic/fxp.c19
-rw-r--r--sys/dev/ic/fxpvar.h5
-rw-r--r--sys/dev/ic/malo.c3
-rw-r--r--sys/dev/ic/malo.h3
-rw-r--r--sys/dev/ic/pgt.c14
-rw-r--r--sys/dev/ic/pgtvar.h4
-rw-r--r--sys/dev/ic/rt2560.c4
-rw-r--r--sys/dev/ic/rt2560var.h4
-rw-r--r--sys/dev/ic/rt2661.c4
-rw-r--r--sys/dev/ic/rt2661var.h4
-rw-r--r--sys/dev/ic/rt2860.c4
-rw-r--r--sys/dev/ic/rt2860var.h4
-rw-r--r--sys/dev/ic/rtl81x9.c8
-rw-r--r--sys/dev/ic/rtsx.c11
-rw-r--r--sys/dev/ic/xl.c16
23 files changed, 72 insertions, 100 deletions
diff --git a/sys/dev/ic/ahci.c b/sys/dev/ic/ahci.c
index fe8b4168860..55f28cb2149 100644
--- a/sys/dev/ic/ahci.c
+++ b/sys/dev/ic/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.4 2013/11/06 12:06:58 deraadt Exp $ */
+/* $OpenBSD: ahci.c,v 1.5 2013/12/06 21:03:02 deraadt Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -317,19 +317,6 @@ ahci_activate(struct device *self, int act)
int i, rv = 0;
switch (act) {
- case DVACT_QUIESCE:
- rv = config_activate_children(self, act);
- break;
- case DVACT_SUSPEND:
- rv = config_activate_children(self, act);
- break;
- case DVACT_POWERDOWN:
- rv = config_activate_children(self, act);
- for (i = 0; i < AHCI_MAX_PORTS; i++) {
- if (sc->sc_ports[i] != NULL)
- ahci_port_stop(sc->sc_ports[i], 1);
- }
- break;
case DVACT_RESUME:
/* enable ahci (global interrupts disabled) */
ahci_write(sc, AHCI_REG_GHC, AHCI_REG_GHC_AE);
@@ -347,6 +334,16 @@ ahci_activate(struct device *self, int act)
rv = config_activate_children(self, act);
break;
+ case DVACT_POWERDOWN:
+ rv = config_activate_children(self, act);
+ for (i = 0; i < AHCI_MAX_PORTS; i++) {
+ if (sc->sc_ports[i] != NULL)
+ ahci_port_stop(sc->sc_ports[i], 1);
+ }
+ break;
+ default:
+ rv = config_activate_children(self, act);
+ break;
}
return (rv);
}
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c
index 5d5ab61c569..3aa4f0b64f1 100644
--- a/sys/dev/ic/athn.c
+++ b/sys/dev/ic/athn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: athn.c,v 1.79 2013/11/26 09:50:32 mpi Exp $ */
+/* $OpenBSD: athn.c,v 1.80 2013/12/06 21:03:02 deraadt Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -2888,7 +2888,7 @@ athn_suspend(struct athn_softc *sc)
}
void
-athn_resume(struct athn_softc *sc)
+athn_wakeup(struct athn_softc *sc)
{
struct ifnet *ifp = &sc->sc_ic.ic_if;
diff --git a/sys/dev/ic/athnvar.h b/sys/dev/ic/athnvar.h
index e490a4577e2..c8982e7254b 100644
--- a/sys/dev/ic/athnvar.h
+++ b/sys/dev/ic/athnvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: athnvar.h,v 1.34 2013/10/21 16:13:49 stsp Exp $ */
+/* $OpenBSD: athnvar.h,v 1.35 2013/12/06 21:03:02 deraadt Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -581,5 +581,5 @@ struct athn_softc {
extern int athn_attach(struct athn_softc *);
extern void athn_detach(struct athn_softc *);
extern void athn_suspend(struct athn_softc *);
-extern void athn_resume(struct athn_softc *);
+extern void athn_wakeup(struct athn_softc *);
extern int athn_intr(void *);
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index f390b45f3e0..443c1c0d08e 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.79 2013/12/03 22:47:28 brad Exp $ */
+/* $OpenBSD: atw.c,v 1.80 2013/12/06 21:03:02 deraadt Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -560,8 +560,6 @@ atw_attach(struct atw_softc *sc)
sc->sc_txth = atw_txthresh_tab_lo;
- task_set(&sc->sc_resume_t, atw_resume, sc, NULL);
-
SIMPLEQ_INIT(&sc->sc_txfreeq);
SIMPLEQ_INIT(&sc->sc_txdirtyq);
@@ -3987,17 +3985,16 @@ atw_activate(struct device *self, int act)
if (sc->sc_power != NULL)
(*sc->sc_power)(sc, act);
break;
- case DVACT_RESUME:
- task_add(systq, &sc->sc_resume_t);
+ case DVACT_WAKEUP:
+ atw_wakeup(sc);
break;
}
return 0;
}
void
-atw_resume(void *arg1, void *arg2)
+atw_wakeup(struct atw_softc *sc)
{
- struct atw_softc *sc = (struct atw_softc *)arg1;
struct ifnet *ifp = &sc->sc_ic.ic_if;
if (sc->sc_power != NULL)
diff --git a/sys/dev/ic/atwvar.h b/sys/dev/ic/atwvar.h
index 9de82d4b368..f31f71487b2 100644
--- a/sys/dev/ic/atwvar.h
+++ b/sys/dev/ic/atwvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atwvar.h,v 1.25 2013/11/14 12:30:39 dlg Exp $ */
+/* $OpenBSD: atwvar.h,v 1.26 2013/12/06 21:03:02 deraadt Exp $ */
/* $NetBSD: atwvar.h,v 1.13 2004/07/23 07:07:55 dyoung Exp $ */
/*
@@ -35,7 +35,6 @@
#include <sys/queue.h>
#include <sys/time.h>
#include <sys/timeout.h>
-#include <sys/task.h>
/*
* Some misc. statics, useful for debugging.
@@ -278,8 +277,6 @@ struct atw_softc {
struct atw_tx_radiotap_header tap;
u_int8_t pad[64];
} sc_txtapu;
-
- struct task sc_resume_t;
};
#define sc_rxtap sc_rxtapu.tap
@@ -440,6 +437,6 @@ int atw_detach(struct atw_softc *);
int atw_activate(struct device *, int);
int atw_intr(void *arg);
int atw_enable(struct atw_softc *);
-void atw_resume(void *, void *);
+void atw_wakeup(struct atw_softc *);
#endif /* _DEV_IC_ATWVAR_H_ */
diff --git a/sys/dev/ic/bwi.c b/sys/dev/ic/bwi.c
index 68f7ebd91ff..1ac1cdeea16 100644
--- a/sys/dev/ic/bwi.c
+++ b/sys/dev/ic/bwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwi.c,v 1.99 2013/11/14 12:10:04 dlg Exp $ */
+/* $OpenBSD: bwi.c,v 1.100 2013/12/06 21:03:02 deraadt Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -44,7 +44,6 @@
#include <sys/device.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-#include <sys/task.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/socket.h>
diff --git a/sys/dev/ic/bwivar.h b/sys/dev/ic/bwivar.h
index aa77d03f780..1489e552af6 100644
--- a/sys/dev/ic/bwivar.h
+++ b/sys/dev/ic/bwivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bwivar.h,v 1.28 2013/11/26 20:33:15 deraadt Exp $ */
+/* $OpenBSD: bwivar.h,v 1.29 2013/12/06 21:03:02 deraadt Exp $ */
/*
* Copyright (c) 2007 The DragonFly Project. All rights reserved.
@@ -620,7 +620,6 @@ struct bwi_softc {
#define sc_txtap sc_txtapu.th
int sc_txtap_len;
#endif
- struct task sc_resume_t;
};
#define BWI_F_BUS_INITED 0x1
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c
index 32d81e7244f..4c69bd04b43 100644
--- a/sys/dev/ic/dc.c
+++ b/sys/dev/ic/dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dc.c,v 1.129 2013/12/02 23:40:41 brad Exp $ */
+/* $OpenBSD: dc.c,v 1.130 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -3104,9 +3104,6 @@ dc_activate(struct device *self, int act)
int rv = 0;
switch (act) {
- case DVACT_QUIESCE:
- rv = config_activate_children(self, act);
- break;
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
dc_stop(sc, 0);
@@ -3117,6 +3114,9 @@ dc_activate(struct device *self, int act)
if (ifp->if_flags & IFF_UP)
dc_init(sc);
break;
+ default:
+ rv = config_activate_children(self, act);
+ break;
}
return (rv);
}
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c
index 04486a5dac5..6c1d9965b14 100644
--- a/sys/dev/ic/fxp.c
+++ b/sys/dev/ic/fxp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxp.c,v 1.113 2013/11/14 12:16:01 dlg Exp $ */
+/* $OpenBSD: fxp.c,v 1.114 2013/12/06 21:03:03 deraadt Exp $ */
/* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */
/*
@@ -47,7 +47,6 @@
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/timeout.h>
-#include <sys/task.h>
#include <net/if.h>
#include <net/if_dl.h>
@@ -294,28 +293,26 @@ fxp_activate(struct device *self, int act)
int rv = 0;
switch (act) {
- case DVACT_QUIESCE:
- rv = config_activate_children(self, act);
- break;
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
fxp_stop(sc, 1, 0);
rv = config_activate_children(self, act);
break;
- case DVACT_RESUME:
+ case DVACT_WAKEUP:
rv = config_activate_children(self, act);
if (ifp->if_flags & IFF_UP)
- task_add(systq, &sc->sc_resume_t);
+ fxp_wakeup(sc);
+ break;
+ default:
+ rv = config_activate_children(self, act);
break;
}
return (rv);
}
void
-fxp_resume(void *arg1, void *arg2)
+fxp_wakeup(struct fxp_softc *sc)
{
- struct fxp_softc *sc = arg1;
-
int s = splnet();
/* force reload of the microcode */
@@ -342,8 +339,6 @@ fxp_attach(struct fxp_softc *sc, const char *intrstr)
u_int8_t enaddr[6];
int i, err;
- task_set(&sc->sc_resume_t, fxp_resume, sc, NULL);
-
/*
* Reset to a stable state.
*/
diff --git a/sys/dev/ic/fxpvar.h b/sys/dev/ic/fxpvar.h
index adeed5a8930..496635286a0 100644
--- a/sys/dev/ic/fxpvar.h
+++ b/sys/dev/ic/fxpvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: fxpvar.h,v 1.36 2013/11/14 12:16:01 dlg Exp $ */
+/* $OpenBSD: fxpvar.h,v 1.37 2013/12/06 21:03:03 deraadt Exp $ */
/* $NetBSD: if_fxpvar.h,v 1.1 1997/06/05 02:01:58 thorpej Exp $ */
/*
@@ -142,7 +142,6 @@ struct fxp_softc {
u_int16_t sc_bundle_max; /* max # frames per interrupt (ucode) */
u_int16_t sc_min_size_mask; /* bit-mask describing the minimum
* size of frame that will be bundled */
- struct task sc_resume_t;
u_int32_t *sc_ucodebuf;
size_t sc_ucodelen;
@@ -164,7 +163,7 @@ void fxp_detach(struct fxp_softc *);
void fxp_init(void *);
void fxp_stop(struct fxp_softc *, int, int);
int fxp_activate(struct device *, int);
-void fxp_resume(void *, void *);
+void fxp_wakeup(struct fxp_softc *);
#define FXP_RXMAP_GET(sc) ((sc)->sc_rxmaps[(sc)->sc_rxfree++])
#define FXP_RXMAP_PUT(sc,map) ((sc)->sc_rxmaps[--(sc)->sc_rxfree] = (map))
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c
index 327317d5a7c..1d4e370e994 100644
--- a/sys/dev/ic/malo.c
+++ b/sys/dev/ic/malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.c,v 1.96 2013/11/14 12:21:13 dlg Exp $ */
+/* $OpenBSD: malo.c,v 1.97 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -25,7 +25,6 @@
#include <sys/device.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
-#include <sys/task.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/socket.h>
diff --git a/sys/dev/ic/malo.h b/sys/dev/ic/malo.h
index 2598296d2fb..ced8fea7f04 100644
--- a/sys/dev/ic/malo.h
+++ b/sys/dev/ic/malo.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.h,v 1.11 2013/11/14 12:21:13 dlg Exp $ */
+/* $OpenBSD: malo.h,v 1.12 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -124,7 +124,6 @@ struct malo_softc {
#define sc_txtap sc_txtapu.th
int sc_txtap_len;
#endif
- struct task sc_resume_t;
};
int malo_intr(void *arg);
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c
index 81bdb46f56e..a7de558fe91 100644
--- a/sys/dev/ic/pgt.c
+++ b/sys/dev/ic/pgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgt.c,v 1.72 2013/11/14 12:24:18 dlg Exp $ */
+/* $OpenBSD: pgt.c,v 1.73 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -58,7 +58,6 @@
#include <sys/time.h>
#include <sys/ioctl.h>
#include <sys/device.h>
-#include <sys/task.h>
#include <machine/bus.h>
#include <machine/endian.h>
@@ -190,7 +189,7 @@ int pgt_dma_alloc(struct pgt_softc *);
int pgt_dma_alloc_queue(struct pgt_softc *sc, enum pgt_queue pq);
void pgt_dma_free(struct pgt_softc *);
void pgt_dma_free_queue(struct pgt_softc *sc, enum pgt_queue pq);
-void pgt_resume(void *, void *);
+void pgt_wakeup(struct pgt_softc *);
void
pgt_write_memory_barrier(struct pgt_softc *sc)
@@ -580,8 +579,6 @@ pgt_attach(void *xsc)
//sc->sc_debug |= SC_DEBUG_RXFRAG;
//sc->sc_debug |= SC_DEBUG_RXETHER;
- task_set(&sc->sc_resume_t, pgt_resume, sc, NULL);
-
/* enable card if possible */
if (sc->sc_enable != NULL)
(*sc->sc_enable)(sc);
@@ -3298,17 +3295,16 @@ pgt_activate(struct device *self, int act)
if (sc->sc_power != NULL)
(*sc->sc_power)(sc, act);
break;
- case DVACT_RESUME:
- task_add(systq, &sc->sc_resume_t);
+ case DVACT_WAKEUP:
+ pgt_wakeup(sc);
break;
}
return 0;
}
void
-pgt_resume(void *arg1, void *arg2)
+pgt_wakeup(struct pgt_softc *sc)
{
- struct pgt_softc *sc = arg1;
struct ifnet *ifp = &sc->sc_ic.ic_if;
if (sc->sc_power != NULL)
diff --git a/sys/dev/ic/pgtvar.h b/sys/dev/ic/pgtvar.h
index ef50f7b1b41..e598c363d49 100644
--- a/sys/dev/ic/pgtvar.h
+++ b/sys/dev/ic/pgtvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pgtvar.h,v 1.15 2013/11/14 12:24:18 dlg Exp $ */
+/* $OpenBSD: pgtvar.h,v 1.16 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -208,8 +208,6 @@ struct pgt_softc {
#define sc_txtap sc_txtapu.th
int sc_txtap_len;
#endif
-
- struct task sc_resume_t;
};
int pgt_intr(void *);
diff --git a/sys/dev/ic/rt2560.c b/sys/dev/ic/rt2560.c
index ed67d05096f..199fe8ff597 100644
--- a/sys/dev/ic/rt2560.c
+++ b/sys/dev/ic/rt2560.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2560.c,v 1.61 2013/08/07 01:06:30 bluhm Exp $ */
+/* $OpenBSD: rt2560.c,v 1.62 2013/12/06 21:03:03 deraadt Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -333,7 +333,7 @@ rt2560_suspend(void *xsc)
}
void
-rt2560_resume(void *xsc)
+rt2560_wakeup(void *xsc)
{
struct rt2560_softc *sc = xsc;
struct ifnet *ifp = &sc->sc_ic.ic_if;
diff --git a/sys/dev/ic/rt2560var.h b/sys/dev/ic/rt2560var.h
index 54490b0a965..10f1f3c9eb3 100644
--- a/sys/dev/ic/rt2560var.h
+++ b/sys/dev/ic/rt2560var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2560var.h,v 1.10 2012/07/13 10:08:15 stsp Exp $ */
+/* $OpenBSD: rt2560var.h,v 1.11 2013/12/06 21:03:03 deraadt Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -168,5 +168,5 @@ struct rt2560_softc {
int rt2560_attach(void *, int);
int rt2560_detach(void *);
void rt2560_suspend(void *);
-void rt2560_resume(void *);
+void rt2560_wakeup(void *);
int rt2560_intr(void *);
diff --git a/sys/dev/ic/rt2661.c b/sys/dev/ic/rt2661.c
index 42e0255a43f..e154f461c85 100644
--- a/sys/dev/ic/rt2661.c
+++ b/sys/dev/ic/rt2661.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661.c,v 1.69 2013/08/07 01:06:30 bluhm Exp $ */
+/* $OpenBSD: rt2661.c,v 1.70 2013/12/06 21:03:03 deraadt Exp $ */
/*-
* Copyright (c) 2006
@@ -419,7 +419,7 @@ rt2661_suspend(void *xsc)
}
void
-rt2661_resume(void *xsc)
+rt2661_wakeup(void *xsc)
{
struct rt2661_softc *sc = xsc;
struct ifnet *ifp = &sc->sc_ic.ic_if;
diff --git a/sys/dev/ic/rt2661var.h b/sys/dev/ic/rt2661var.h
index 3330c6233cc..92cf9623e2c 100644
--- a/sys/dev/ic/rt2661var.h
+++ b/sys/dev/ic/rt2661var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2661var.h,v 1.17 2012/08/23 10:34:25 stsp Exp $ */
+/* $OpenBSD: rt2661var.h,v 1.18 2013/12/06 21:03:03 deraadt Exp $ */
/*-
* Copyright (c) 2006
@@ -196,5 +196,5 @@ struct rt2661_softc {
int rt2661_attach(void *, int);
int rt2661_detach(void *);
void rt2661_suspend(void *);
-void rt2661_resume(void *);
+void rt2661_wakeup(void *);
int rt2661_intr(void *);
diff --git a/sys/dev/ic/rt2860.c b/sys/dev/ic/rt2860.c
index ff3a8c7d7f6..21ed2f2b1b9 100644
--- a/sys/dev/ic/rt2860.c
+++ b/sys/dev/ic/rt2860.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860.c,v 1.70 2013/08/07 01:06:30 bluhm Exp $ */
+/* $OpenBSD: rt2860.c,v 1.71 2013/12/06 21:03:03 deraadt Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -415,7 +415,7 @@ rt2860_suspend(void *xsc)
}
void
-rt2860_resume(void *xsc)
+rt2860_wakeup(void *xsc)
{
struct rt2860_softc *sc = xsc;
struct ifnet *ifp = &sc->sc_ic.ic_if;
diff --git a/sys/dev/ic/rt2860var.h b/sys/dev/ic/rt2860var.h
index 720abcf43c7..76161291541 100644
--- a/sys/dev/ic/rt2860var.h
+++ b/sys/dev/ic/rt2860var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rt2860var.h,v 1.20 2010/09/07 16:21:42 deraadt Exp $ */
+/* $OpenBSD: rt2860var.h,v 1.21 2013/12/06 21:03:03 deraadt Exp $ */
/*-
* Copyright (c) 2007
@@ -203,5 +203,5 @@ struct rt2860_softc {
int rt2860_attach(void *, int);
int rt2860_detach(void *);
void rt2860_suspend(void *);
-void rt2860_resume(void *);
+void rt2860_wakeup(void *);
int rt2860_intr(void *);
diff --git a/sys/dev/ic/rtl81x9.c b/sys/dev/ic/rtl81x9.c
index ea3430b3d65..0f1b8420316 100644
--- a/sys/dev/ic/rtl81x9.c
+++ b/sys/dev/ic/rtl81x9.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9.c,v 1.79 2013/08/21 05:21:43 dlg Exp $ */
+/* $OpenBSD: rtl81x9.c,v 1.80 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1240,9 +1240,6 @@ rl_activate(struct device *self, int act)
int rv = 0;
switch (act) {
- case DVACT_QUIESCE:
- rv = config_activate_children(self, act);
- break;
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING)
rl_stop(sc);
@@ -1253,6 +1250,9 @@ rl_activate(struct device *self, int act)
if (ifp->if_flags & IFF_UP)
rl_init(sc);
break;
+ default:
+ rv = config_activate_children(self, act);
+ break;
}
return (rv);
}
diff --git a/sys/dev/ic/rtsx.c b/sys/dev/ic/rtsx.c
index a38c14f8662..63c929e827a 100644
--- a/sys/dev/ic/rtsx.c
+++ b/sys/dev/ic/rtsx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsx.c,v 1.5 2013/11/06 13:51:02 stsp Exp $ */
+/* $OpenBSD: rtsx.c,v 1.6 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -315,16 +315,10 @@ rtsx_activate(struct device *self, int act)
int rv = 0;
switch (act) {
- case DVACT_QUIESCE:
- rv = config_activate_children(self, act);
- break;
case DVACT_SUSPEND:
rv = config_activate_children(self, act);
rtsx_save_regs(sc);
break;
- case DVACT_POWERDOWN:
- rv = config_activate_children(self, act);
- break;
case DVACT_RESUME:
rtsx_restore_regs(sc);
@@ -336,6 +330,9 @@ rtsx_activate(struct device *self, int act)
rv = config_activate_children(self, act);
break;
+ default:
+ rv = config_activate_children(self, act);
+ break;
}
return (rv);
}
diff --git a/sys/dev/ic/xl.c b/sys/dev/ic/xl.c
index 87e041829c1..de8d9b42cde 100644
--- a/sys/dev/ic/xl.c
+++ b/sys/dev/ic/xl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xl.c,v 1.110 2013/08/07 01:06:31 bluhm Exp $ */
+/* $OpenBSD: xl.c,v 1.111 2013/12/06 21:03:03 deraadt Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -203,9 +203,6 @@ xl_activate(struct device *self, int act)
int rv = 0;
switch (act) {
- case DVACT_QUIESCE:
- rv = config_activate_children(self, act);
- break;
case DVACT_SUSPEND:
if (ifp->if_flags & IFF_RUNNING) {
xl_reset(sc);
@@ -213,17 +210,20 @@ xl_activate(struct device *self, int act)
}
rv = config_activate_children(self, act);
break;
+ case DVACT_RESUME:
+ xl_reset(sc);
+ rv = config_activate_children(self, act);
+ 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;
- case DVACT_RESUME:
- xl_reset(sc);
+ default:
rv = config_activate_children(self, act);
- if (ifp->if_flags & IFF_UP)
- xl_init(sc);
break;
}
return (rv);