summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2010-08-07 15:50:24 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2010-08-07 15:50:24 +0000
commitba94c85bc6f4bc5def1ea7851c41cb407afd2fbc (patch)
treeed98aadcedadf5e8676a57ed7c67f4716cd7029c /sys/dev
parent4dd049781070f427fef1df9887b084d593fef229 (diff)
Add resume support for serial consoles.
Tested by sthen@, ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/com.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c
index 0cf3a35bf83..5024189d2e7 100644
--- a/sys/dev/ic/com.c
+++ b/sys/dev/ic/com.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: com.c,v 1.143 2010/08/06 21:04:14 kettenis Exp $ */
+/* $OpenBSD: com.c,v 1.144 2010/08/07 15:50:23 kettenis Exp $ */
/* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */
/*
@@ -574,8 +574,13 @@ com_resume(struct com_softc *sc)
bus_space_handle_t ioh = sc->sc_ioh;
int ospeed;
- if (!tp || !ISSET(tp->t_state, TS_ISOPEN))
+ if (!tp || !ISSET(tp->t_state, TS_ISOPEN)) {
+#ifdef COM_CONSOLE
+ if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE))
+ cominit(iot, ioh, comconsrate, comconsfreq);
+#endif
return;
+ }
/*
* Wake up the sleepy heads.