All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <jhovold@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@kroah.com>, Peter Feuerer <peter@piie.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [BUG] usb-serial / pl2302 corrupted receive
Date: Wed, 3 Mar 2010 15:50:46 +0100	[thread overview]
Message-ID: <20100303145046.GB15162@localhost> (raw)
In-Reply-To: <20100303121441.622e271f@lxorguk.ukuu.org.uk>

On Wed, Mar 03, 2010 at 12:14:41PM +0000, Alan Cox wrote:
> > > Terminal1:
> > > cat /dev/ttyUSB1
> > > 
> > > Terminal2:
> > > while true; do echo 123456789012345678901234567890 > /dev/ttyUSB0 ; done
> > 
> > cat and echo are known to not work well with usb to serial devices.  Can
> > you duplicate this with a "real" tty program like minicom or something
> > else?
> 
> That should no longer be the case. The kfifo buffering implementation
> fixed all the broken internal buffering in the usb tty code - or should
> have done.

Actually, the per-bulk-out-point allocated kfifo is currently unsused for most
drivers, including the pl2303.

I'm responding to this mail with a patch (against 2.6.33) which replaces
the custom fifo-based write implementation in pl2303 with the generic
kfifo based one. I've used it for quite a while now without any problems
(just haven't got around to submitting it).

If Alan's correct, this might solve the echo/cat issue, but either way
it should be applied at some point as it removes a lot of duplicate code.

/Johan


  reply	other threads:[~2010-03-03 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-01 18:07 [BUG] usb-serial / pl2302 corrupted receive Peter Feuerer
2010-03-02 23:53 ` Greg KH
2010-03-03 10:47   ` peter
2010-03-03 14:17     ` Johan Hovold
2010-03-03 18:31       ` Andreas Kemnade
2010-03-03 12:14   ` Alan Cox
2010-03-03 14:50     ` Johan Hovold [this message]
2010-03-03 15:01       ` [PATCH] USB: pl2303: switch to generic write implementation Johan Hovold
2010-03-03 15:08         ` Oliver Neukum
2010-03-04 11:12           ` [PATCH v2] " Johan Hovold
2010-03-15 23:20             ` Greg KH
2010-03-17  9:16               ` Johan Hovold

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=20100303145046.GB15162@localhost \
    --to=jhovold@gmail.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter@piie.net \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.