Module Name: src
Committed By: kiyohara
Date: Sat Jul 27 06:54:35 UTC 2013
Modified Files:
src/sys/dev/ic: com.c
Log Message:
As for the console of ns16750, comintr() may be called before comopen().
If sc_lcr is not initialized at this time, console will be in an ugly state.
To generate a diff of this commit:
cvs rdiff -u -r1.311 -r1.312 src/sys/dev/ic/com.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/com.c
diff -u src/sys/dev/ic/com.c:1.311 src/sys/dev/ic/com.c:1.312
--- src/sys/dev/ic/com.c:1.311 Sat Jul 27 06:43:56 2013
+++ src/sys/dev/ic/com.c Sat Jul 27 06:54:35 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.311 2013/07/27 06:43:56 kiyohara Exp $ */
+/* $NetBSD: com.c,v 1.312 2013/07/27 06:54:35 kiyohara Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.311 2013/07/27 06:43:56 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.312 2013/07/27 06:54:35 kiyohara Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -416,6 +416,11 @@ com_attach_subr(struct com_softc *sc)
(u_long)comcons_info.regs.cr_iobase);
}
+#ifdef COM_16750
+ /* Use in comintr(). */
+ sc->sc_lcr = cflag2lcr(comcons_info.cflag);
+#endif
+
/* Make sure the console is always "hardwired". */
delay(10000); /* wait for output to finish */
if (is_console) {