Serial console problems with stable/8

Ed Schouten ed at 80386.nl
Mon Sep 13 18:44:03 UTC 2010


Just replying to a random message in this thread.

Maybe we should just implement /dev/console in such a way that it can
never get stuck on dcd. I've seen this break too many times.

Below is an untested patch. Anyone willing to test it for me?

As Jeremy did point out, FreeBSD's TTY/serial/etc code really lacks a
true console device which multiplexes both input and output to all
serial devices.

%%%
Index: tty.c
===================================================================
--- tty.c	(revision 212549)
+++ tty.c	(working copy)
@@ -282,7 +282,8 @@
 
 	/* Wait for Carrier Detect. */
 	if (!TTY_CALLOUT(tp, dev) && (oflags & O_NONBLOCK) == 0 &&
-	    (tp->t_termios.c_cflag & CLOCAL) == 0) {
+	    (tp->t_termios.c_cflag & CLOCAL) == 0 &&
+	    dev != dev_console) {
 		while ((ttydevsw_modem(tp, 0, 0) & SER_DCD) == 0) {
 			error = tty_wait(tp, &tp->t_dcdwait);
 			if (error != 0)
%%%

-- 
 Ed Schouten <ed at 80386.nl>
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20100913/618fa0e2/attachment.pgp


More information about the freebsd-stable mailing list