Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Sep 2010 20:44:02 +0200
From:      Ed Schouten <ed@80386.nl>
To:        Jeremy Chadwick <freebsd@jdc.parodius.com>
Cc:        freebsd-stable@FreeBSD.ORG, Oliver Fromme <olli@lurza.secnetix.de>
Subject:   Re: Serial console problems with stable/8
Message-ID:  <20100913184402.GH56986@hoeg.nl>
In-Reply-To: <20100913074050.GA45070@icarus.home.lan>
References:  <20100913065658.GA44306@icarus.home.lan> <201009130721.o8D7LLId098604@lurza.secnetix.de> <20100913074050.GA45070@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help

--yTDPf8dFFzrn4Hdx
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

--=20
 Ed Schouten <ed@80386.nl>
 WWW: http://80386.nl/

--yTDPf8dFFzrn4Hdx
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (FreeBSD)

iEYEARECAAYFAkyOcPIACgkQ52SDGA2eCwXo4ACfatMv6F7p6BKPJNIZq2zRwAKG
IMQAniPCzpnMF0T+cGguYaGYuJvLZN6B
=WJc4
-----END PGP SIGNATURE-----

--yTDPf8dFFzrn4Hdx--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100913184402.GH56986>