From mboxrd@z Thu Jan 1 00:00:00 1970 From: lsorense@csclub.uwaterloo.ca (Lennart Sorensen) Subject: Re: Very strange data loss with jsm driver Date: Tue, 2 Aug 2011 10:23:53 -0400 Message-ID: <20110802142353.GP8562@caffeine.csclub.uwaterloo.ca> References: <20110729160416.GK8562@caffeine.csclub.uwaterloo.ca> <20110729172736.4b199d31@lxorguk.ukuu.org.uk> <20110729165342.GB8566@caffeine.csclub.uwaterloo.ca> <20110729180650.GL8562@caffeine.csclub.uwaterloo.ca> <20110729191442.35d09111@lxorguk.ukuu.org.uk> <20110729181337.GM8562@caffeine.csclub.uwaterloo.ca> <4E380710.1010204@linux.vnet.ibm.com> <20110802142225.GO8562@caffeine.csclub.uwaterloo.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from caffeine.csclub.uwaterloo.ca ([129.97.134.17]:42709 "EHLO caffeine.csclub.uwaterloo.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793Ab1HBOXx (ORCPT ); Tue, 2 Aug 2011 10:23:53 -0400 Content-Disposition: inline In-Reply-To: <20110802142225.GO8562@caffeine.csclub.uwaterloo.ca> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Lennart Sorensen Cc: Breno Leitao , Alan Cox , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org On Tue, Aug 02, 2011 at 10:22:25AM -0400, Lennart Sorensen wrote: > On Tue, Aug 02, 2011 at 11:17:52AM -0300, Breno Leitao wrote: > > Well, I finally tested it over here, and what I found is: > > > > If the line has a \r among the first 16 bytes, then the information > > is TXed immediately. If there is no \r in the first 16 bytes, then the > > information seems to be buffered. > > Where in the driver is this happening? > > > So, it seems that that the patch should ask the driver to TX the > > information when we receive a \r or when the buffer is full. Does it > > make sense to you ? > > Not sure. I just wonder why the data is disappearing rather than getting > buffered somewhere. Clearly the other serial drivers are doing that > successfully. > > I don't even know why the driver should care about the contents at all. > Just send data when it is ready. Also, do you have any idea how to fix the statistics that 2.6.37 broke? /proc/tty/driver/jsm used to show TX/RX and such, and that stopped working. I managed to fix it on Debian's 2.6.32 kernel which has some 2.6.37 serial stuff backported, but the same fix didn't work on 3.0.0. -- Len Sorensen