Module Name: src
Committed By: skrll
Date: Sun Dec 15 11:06:57 UTC 2013
Modified Files:
src/sys/dev/ic: com.c
Log Message:
Only attempt to set 64byte fifo for 16750 when COM_16750 is defined.
Hi kiyohara.
PR/48359 NetBSD/cobalt 6.99.25 GENERIC kernel freeze at initializing com0
To generate a diff of this commit:
cvs rdiff -u -r1.317 -r1.318 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.317 src/sys/dev/ic/com.c:1.318
--- src/sys/dev/ic/com.c:1.317 Thu Oct 3 13:23:03 2013
+++ src/sys/dev/ic/com.c Sun Dec 15 11:06:57 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.317 2013/10/03 13:23:03 kiyohara Exp $ */
+/* $NetBSD: com.c,v 1.318 2013/12/15 11:06:57 skrll 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.317 2013/10/03 13:23:03 kiyohara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.318 2013/12/15 11:06:57 skrll Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -492,6 +492,7 @@ com_attach_subr(struct com_softc *sc)
#endif
sc->sc_fifolen = 16;
+#ifdef COM_16750
/*
* TL16C750 can enable 64byte FIFO, only when DLAB
* is 1. However, some 16750 may always enable. For
@@ -522,6 +523,7 @@ com_attach_subr(struct com_softc *sc)
SET(sc->sc_hwflags, COM_HW_AFE);
} else
CSR_WRITE_1(regsp, COM_REG_FIFO, fcr);
+#endif
#ifdef COM_16650
CSR_WRITE_1(regsp, COM_REG_LCR, lcr);
@@ -531,9 +533,11 @@ com_attach_subr(struct com_softc *sc)
fifo_msg = "st16650a, working fifo";
else
#endif
+#ifdef COM_16750
if (sc->sc_fifolen == 64)
fifo_msg = "tl16c750, working fifo";
else
+#endif
fifo_msg = "ns16550a, working fifo";
} else
fifo_msg = "ns16550, broken fifo";