From 51fa35e58f3a821dedb521440ddc2b87a9364ec3 Mon Sep 17 00:00:00 2001 From: kettenis Date: Sat, 7 Aug 2010 15:50:23 +0000 Subject: [PATCH] Add resume support for serial consoles. Tested by sthen@, ok deraadt@ --- sys/dev/ic/com.c | 9 +++++++-- 1 file 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. -- 2.20.1