From owner-freebsd-current@FreeBSD.ORG Sun May 16 02:37:38 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 3D64B16A4CE for ; Sun, 16 May 2004 02:37:38 -0700 (PDT) Received: from hanoi.cronyx.ru (hanoi.cronyx.ru [144.206.181.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2A6343D58 for ; Sun, 16 May 2004 02:37:36 -0700 (PDT) (envelope-from rik@cronyx.ru) Received: (from root@localhost) by hanoi.cronyx.ru id i4G9Z1Xq025066 for freebsd-current@freebsd.org.checked; (8.12.8/vak/2.1) Sun, 16 May 2004 13:35:01 +0400 (MSD) (envelope-from rik@cronyx.ru) Received: from cronyx.ru (rik.cronyx.ru [172.22.4.1]) by hanoi.cronyx.ru with ESMTP id i4G9XHF2025006; (8.12.8/vak/2.1) Sun, 16 May 2004 13:33:17 +0400 (MSD) (envelope-from rik@cronyx.ru) Message-ID: <40A73401.5010703@cronyx.ru> Date: Sun, 16 May 2004 13:27:29 +0400 From: Roman Kurakin User-Agent: Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20030426 X-Accept-Language: ru-ru, en MIME-Version: 1.0 To: Marcel Moolenaar References: <40A26162.9030607@cronyx.ru> <20040512.200542.09569104.imp@bsdimp.com> <20040513155109.GB6572@dhcp01.pn.xcllnt.net> <40A4E2CB.2000007@cronyx.ru> <20040515041301.O22881@gamplex.bde.org> <40A537C8.1010407@cronyx.ru> <20040515190413.GB9900@dhcp01.pn.xcllnt.net> In-Reply-To: <20040515190413.GB9900@dhcp01.pn.xcllnt.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org 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 09:37:38 -0000 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; >@@ -198,7 +199,7 @@ > for (c=chan; c if (c->fd > 0) { > if (c->ready_to_transmit) { >- s = write (c->fd, tbuf+it, IOSZ); >+ s = write (c->fd, tbuf+it, IOSZ-it); > if (s <= 0) { > if (s < 0) { > if (errno != EAGAIN) > > Works good with my card. Thanks! >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. >triggered by write() doing partial writes. This bug too may be the >result of uart(4) not setting the right defaults, but since the test >program doesn't assume complete writes the bug is primarily in the >test program by virtue of allowing partial writes. > > rik