From owner-freebsd-current@FreeBSD.ORG Sun May 16 05:01:36 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CB9616A4CE for ; Sun, 16 May 2004 05:01:36 -0700 (PDT) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 05EF243D54 for ; Sun, 16 May 2004 05:01:35 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])i4GC1K4u004043; Sun, 16 May 2004 22:01:20 +1000 Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) i4GC1HLS027061; Sun, 16 May 2004 22:01:18 +1000 Date: Sun, 16 May 2004 22:01:18 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Roman Kurakin In-Reply-To: <40A73401.5010703@cronyx.ru> Message-ID: <20040516210256.W866@gamplex.bde.org> References: <40A26162.9030607@cronyx.ru> <20040512.200542.09569104.imp@bsdimp.com><40A4E2CB.2000007@cronyx.ru> <20040515041301.O22881@gamplex.bde.org> <40A537C8.1010407@cronyx.ru> <40A73401.5010703@cronyx.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-current@freebsd.org cc: Marcel Moolenaar Subject: Re: Sio & Puc memory mapped X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 May 2004 12:01:36 -0000 On Sun, 16 May 2004, Roman Kurakin wrote: > Marcel Moolenaar: > [...] > > > > >--- asytest.c~ Fri May 14 11:50:10 2004 > >+++ asytest.c Sat May 15 11:31:03 2004 > >@@ -152,6 +152,7 @@ > > } > > > > opt = chan[i].old_options; > >+ cfmakeraw (&opt); > > cfsetspeed (&opt, baud); > > opt.c_cflag = CREAD | CS8; > > opt.c_lflag &= ~ICANON; > > ... > > >The first (the cfmakeraw() insertion) may be related to uart(4) not > >setting proper defaults, but may also be related to uart(4) setting > >different *valid* defaults. The second is a genuine test program bug > > > The only I can say that this test works fine with sio(4), cx(4), > and under linux kernels before 2.6 with serial. So this requires > additional investigation. Programs certainly need to initialize all of the termios state that they care about, but the uart driver uses poorly chosen defaults which can't be changed at runtime and are particularly unsuitable for simple test programs. The only fundamentally broken thing in the uart driver's defaults is that they have echos enabled, so an echo war results if 2 ports driven by the uart driver are connected and one of them happens to send a character before an ioctl can be done to set a useable state. Bruce