Re: [BUG] usb-serial / pl2302 corrupted receive
From: Johan Hovold
Date: Wed Mar 03 2010 - 09:50:56 EST
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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/