LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Gene Heskett <gene.heskett@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: David Newall <davidn@davidnewall.com>, Greg KH <greg@kroah.com>,
	linux-usb@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Handshaking on USB serial devices
Date: Thu, 14 Feb 2008 11:16:14 -0500	[thread overview]
Message-ID: <200802141116.14722.gene.heskett@gmail.com> (raw)
In-Reply-To: <20080214121026.16a9c510@core>

On Thursday 14 February 2008, Alan Cox wrote:
>> To make it clear: Even aside from the buffer in 2.6's pl2303.c, there's
>> a race: An in-flight write URB can fill all hardware buffers, making
>> unsafe what previously appeared to be a safe write.  I think it's
>> essential to delay submission of the URB on a stop-transmit condition.
>
>Hardware flow control *is* a race, and always will be. The remote end has
>a delay in signalling 'stop' there is a propogation delay and a response
>delay. This is why most implementations assert stop a bit *before* they
>run out.
>
>Given the size of transfers and the internal buffering one would hope the
>USB devices do their own flow control if told to properly.
>
>Alan

Apparently they do not Alan, the pl2303 in particular is a problem child, 
throwing several lost com errors a day when doing nothing more strenuous than 
talking to my belkin UPS from apcupsd, very small packets there, 20 bytes I 
believe at several second intervals.  I can cut those messages to about 
weekly by using an FDTI adaptor in its place, or I can stop them entirely if 
a pure rs232 connection is used.  Unforch, pure rs232 is going the way of the 
dodo bird, and the adapters in general fail such applications badly.  I want 
to build a new machine, but the first thing I'd have to get after a new video 
card is a serial card.  And there goes a slot I'll need for something else.  
My current home automation via heyu, the ups, and the Garmin GPS all require 
serial ports.

Another linux app, a route navigator program that uses the output of a GPS to 
display where you are, also has errors several times an hour when using a 
pl2303 to connect a low baud rate Garmin 12 with no flow control to it.  I 
just recently used it for a 3000 mile nearly month long trip.

So IMO, neither of the 2 readily available devices for usb-serial use is quite 
ready for mission critical usage.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
No extensible language will be universal.
		-- T. Cheatham

  reply	other threads:[~2008-02-14 16:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-13 14:45 David Newall
2008-02-14  5:02 ` Greg KH
2008-02-14  9:25   ` David Newall
2008-02-14 12:10     ` Alan Cox
2008-02-14 16:16       ` Gene Heskett [this message]
2008-02-14 16:31         ` Alan Cox
2008-02-14 17:55           ` Gene Heskett
2008-02-14 19:37             ` Alan Cox
2008-02-14 20:04               ` Gene Heskett
2008-02-14 20:52                 ` Greg KH
2008-02-14 21:32                   ` Gene Heskett
2008-02-15  5:08               ` David Newall
2008-02-14 22:39         ` Krzysztof Halasa
2008-02-14 23:09           ` Gene Heskett
2008-02-14 18:04       ` David Newall
2008-02-14 18:53         ` David Brownell
2008-02-14 19:36         ` Alan Cox
2008-02-21 15:22           ` David Newall
2008-02-21 15:15             ` Alan Cox
2008-02-21 19:35               ` David Newall
2008-02-21 20:58                 ` Greg KH
2008-02-14 20:47     ` Greg KH
2008-02-15  5:19       ` David Newall
2008-02-14 11:55   ` Alan Cox
     [not found] <9Wr5Z-7cw-1@gated-at.bofh.it>
     [not found] ` <9WSJ4-222-21@gated-at.bofh.it>
     [not found]   ` <9WTlN-2T0-7@gated-at.bofh.it>
     [not found]     ` <9WTYn-3Zb-29@gated-at.bofh.it>
2008-02-15 12:00       ` Bodo Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200802141116.14722.gene.heskett@gmail.com \
    --to=gene.heskett@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=davidn@davidnewall.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --subject='Re: Handshaking on USB serial devices' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).