diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-12-09 19:47:43 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-12-09 19:47:43 +0000 |
commit | 05ce24a38d896951156477305c80a33e5a1bac5a (patch) | |
tree | c0a605ae87e8a3c8e68433fdb48bee998c83da6b /sys/dev | |
parent | 9e980e412e67a3ea578661e2c8fc63c644e4f080 (diff) |
At suspend/resume time cope with timeouts, DTR on resume in a bus
bus-independent fashion.
ok kettenis
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/com.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 4a494ffcce7..d190fd6fd4c 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.154 2013/02/14 22:22:48 kettenis Exp $ */ +/* $OpenBSD: com.c,v 1.155 2013/12/09 19:47:42 deraadt Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -234,6 +234,16 @@ com_activate(struct device *self, int act) int s, rv = 0; switch (act) { + case DVACT_SUSPEND: + if (timeout_del(&sc->sc_dtr_tmo)) { + /* Make sure DTR gets raised upon resume. */ + SET(sc->sc_mcr, MCR_DTR | MCR_RTS); + } + timeout_del(&sc->sc_diag_tmo); + break; + case DVACT_RESUME: + com_resume(sc); + break; case DVACT_DEACTIVATE: #ifdef KGDB if (sc->sc_hwflags & (COM_HW_CONSOLE|COM_HW_KGDB)) { |