From owner-freebsd-stable@FreeBSD.ORG Mon Sep 13 18:44:03 2010 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC74A1065670 for ; Mon, 13 Sep 2010 18:44:03 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 537C78FC13 for ; Mon, 13 Sep 2010 18:44:03 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id 593D42A28D21; Mon, 13 Sep 2010 20:44:02 +0200 (CEST) Date: Mon, 13 Sep 2010 20:44:02 +0200 From: Ed Schouten To: Jeremy Chadwick Message-ID: <20100913184402.GH56986@hoeg.nl> References: <20100913065658.GA44306@icarus.home.lan> <201009130721.o8D7LLId098604@lurza.secnetix.de> <20100913074050.GA45070@icarus.home.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yTDPf8dFFzrn4Hdx" Content-Disposition: inline In-Reply-To: <20100913074050.GA45070@icarus.home.lan> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: freebsd-stable@FreeBSD.ORG, Oliver Fromme Subject: Re: Serial console problems with stable/8 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2010 18:44:03 -0000 --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 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--