Subject: port-i386/1264: i386/serial console only works on first serial port
To: None <gnats-bugs@NetBSD.ORG>
From: Kenneth Stailey <kstailey@gnu.ai.mit.edu>
List: netbsd-bugs
Date: 07/24/1995 09:42:11
>Number:         1264
>Category:       port-i386
>Synopsis:       i386/serial console only works on first serial port
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 24 12:05:06 1995
>Last-Modified:
>Originator:     Kenneth Stailey
>Organization:
DOL/ESA/DASM
>Release:        June 20 1995 sup.
>Environment:
NetBSD 1.0A (PLUTO) #2: Mon Jul 24 09:14:55 EDT 1995     ken@pluto:/usr/obj/i386/sys/arch/i386/compile/PLUTO

>Description:
	Only the first serial port can be used as console port, and only
	at 9600 baud.
>How-To-Repeat:
	add "options COMCONSOLE=0" to your config file, hook up terminal
	to second serial port at 19200 baud, gee it doesn't work.
>Fix:
	

two diffs, against com.c 1.61 and comreg.h 1.6

see comment changes in comreg.h for config info.

--- /sys/dev/isa/com.c	Tue Jul  4 03:04:29 1995
+++ /usr/patches/sys/dev/isa/com.c	Mon Jul 24 09:13:23 1995
@@ -105,10 +105,11 @@
 	NULL, "com", comprobe, comattach, DV_TTY, sizeof(struct com_softc)
 };
 
-int	comdefaultrate = TTYDEF_SPEED;
 #ifdef COMCONSOLE
+int	comdefaultrate = CONSPEED;
 int	comconsole = COMCONSOLE;
 #else
+int	comdefaultrate = TTYDEF_SPEED;
 int	comconsole = -1;
 #endif
 int	comconsinit;


--- /sys/dev/isa/comreg.h	Wed Jun 28 03:12:32 1995
+++ /usr/patches/sys/dev/isa/comreg.h	Sat Jul 22 13:50:52 1995
@@ -111,8 +111,23 @@
 #define	COM_NPORTS	8
 
 /*
- * WARNING: Serial console is assumed to be at COM1 address
- * and CONUNIT must be 0.
+ * Serial console defaults to first serial port
+ * and 9600 baud, if you use just "options COMCONSOLE=0"
+ *
+ * override port with:
+ *  "options COMCONSOLE=1", "options CONADDR=0x2f8" and "options CONUNIT=1"
+ *
+ * override baud with:
+ *  "options CONSPEED=B19200"
  */
-#define	CONADDR	(0x3f8)
-#define	CONUNIT	(0)
+#ifndef CONADDR
+# define	CONADDR	(0x3f8)
+#endif
+
+#ifndef CONUNIT
+# define	CONUNIT	(0)
+#endif
+
+#ifndef CONSPEED
+# define CONSPEED TTYDEF_SPEED
+#endif
>Audit-Trail:
>Unformatted: