From owner-freebsd-current@FreeBSD.ORG Mon Dec 8 22:39:30 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 52DA5106564A for ; Mon, 8 Dec 2008 22:39:30 +0000 (UTC) (envelope-from mike@sentex.net) Received: from smarthost1.sentex.ca (smarthost1.sentex.ca [64.7.153.18]) by mx1.freebsd.org (Postfix) with ESMTP id F3A3A8FC1A for ; Mon, 8 Dec 2008 22:39:29 +0000 (UTC) (envelope-from mike@sentex.net) Received: from lava.sentex.ca (pyroxene.sentex.ca [199.212.134.18]) by smarthost1.sentex.ca (8.14.3/8.14.3) with ESMTP id mB8MdRkF030630; Mon, 8 Dec 2008 17:39:28 -0500 (EST) (envelope-from mike@sentex.net) Received: from mdt-xp.sentex.net (simeon.sentex.ca [192.168.43.27]) by lava.sentex.ca (8.13.8/8.13.3) with ESMTP id mB8MdRhb043206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Dec 2008 17:39:27 -0500 (EST) (envelope-from mike@sentex.net) Message-Id: <200812082239.mB8MdRhb043206@lava.sentex.ca> X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9 Date: Mon, 08 Dec 2008 17:39:25 -0500 To: Marcel Moolenaar From: Mike Tancsa In-Reply-To: <84A7F176-5A74-48AC-859A-C0D4C7CBCB48@mac.com> References: <200812081621.mB8GLMxB041498@lava.sentex.ca> <200812081906.mB8J6oha042222@lava.sentex.ca> <200812082049.mB8KnHSN042710@lava.sentex.ca> <84A7F176-5A74-48AC-859A-C0D4C7CBCB48@mac.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Scanned-By: MIMEDefang 2.64 on 64.7.153.18 Cc: freebsd-current@freebsd.org Subject: Re: uart vs sio differences ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 08 Dec 2008 22:39:30 -0000 At 04:02 PM 12/8/2008, Marcel Moolenaar wrote: >On Dec 8, 2008, at 12:49 PM, Mike Tancsa wrote: > >>At 02:18 PM 12/8/2008, Marcel Moolenaar wrote: >> >>>I see, so the FreeBSD box with uart(4) is missing data, >>>not the Windows machine, right? >> >>Hi, >> Correct. The FreeBSD box never gets the full data, nor do we >>see it on the "protocol analyzer". Our analyzer is just a special >>serial cable that copies the data from both sides to the monitor >>program (a dos app) on another machine. > >Interesting. If it never shows up on the analyzer, then >doesn't that indicate that it was never sent? >Put differently: doesn't that indicate that the transmitter >stops sending, and not that the receiver stops receiving? What it appears to be is that as long as data is coming in, even at 1200bps, the ioctl FIONREAD returns zero and an actual read does not return any data until there is either a pause in the data coming in or possibly when we do a xmit/write at which point the accumulated data is available for us to read. We dont know if this is due to the hardware fifo or something in the driver itself. >>>Do you know if you get the first 30 bytes or the last 30 >>>bytes or some mix? >> >> >>Just checked, and we get the first 31 bytes each time. > >Ok. > >Could you check if any of RTS/CTS, DTR/DSR or DCD toggles >after about 30 characters? I am not sure if the DOS software we use reliably sees that. We have a fancier windows app that might be more accurate. ---Mike >If the analyzer also just gets the 30 characters, then maybe >the receiver signaled the transmitter to stop (think of the >16950 as having HW flow-control enabled and doing it on its >own, without knowledge of the kernel). > >> Is it possible the larger fifo buffer of the 16950 is holding onto >>the data too long ? The sio sees it as a plain old 16550, but the >>uart driver sees it as the 16950 that it is. > >The 16950 has a 128-byte FIFO, so even if it holds on to >data too long, I would expect to receive at least 128 >bytes of data... >-- >Marcel Moolenaar >xcllnt@mac.com > >