kernel-ark/drivers/usb/serial
Ian Abbott 76854ceac3 [PATCH] USB: ftdi_sio: avoid losing received data in tty-ldisc
ftdi_sio: Avoid losing bytes at tty-ldisc.

This patch was originally developed by Daniel Smertnig.  I
(Ian Abbott) made a few changes.  It has been tested by both
Daniel and I, at least for raw, non-canonical receive data
processing.

Here is Daniel's original description of the patch:

===
During a project in which I was using a FTDI 232BM to
transmit data at relative high speeds (625kBit/s), I
noticed a problem where data was lost even if flow
control was enabled: The FTDI-Driver receives 512 Bytes
of data over USB at a time, which consists of 8 64-Byte
packets. Subtracting the 2 bytes of status information
included in each packet this gives 496 "real" data
bytes per read.

This data is passed (indirectly, via the flip buffers)
to the tty line discipline which takes care of
throttling when there the free buffer space reaches
TTY_THRESHOLD_THROTTLE (128). Because the FTDI driver
processes up to 496 bytes at a time, throttling won't
happen in time and the line discipline will discard the
remaining bytes.

To avoid this the patch passes data in 62-byte blocks
to the tty layer and checks the available space in the
ldisc-buffers. If there isn't enough free space,
processing the rest of the data is delayed using a
workqueue.

Note: The original problem should be easily
reproducible with a userspace program which does slow &
small reads.
===

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Daniel Smertnig <daniel.smertnig@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-09 01:38:15 -07:00
..
airprime.c [PATCH] USB: add a driver for the AirPrime CDMA Wireless PC card. 2005-05-03 23:31:49 -07:00
belkin_sa.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
belkin_sa.h
bus.c
console.c
cp2101.c [PATCH] USB: CP2101 Add support for flow control 2005-06-03 00:04:30 -07:00
cyberjack.c
cypress_m8.c [PATCH] USB: cypress_m8: add support for the DeLorme Earthmate lt-20 2005-05-16 21:44:26 -07:00
cypress_m8.h [PATCH] USB: cypress_m8: add support for the DeLorme Earthmate lt-20 2005-05-16 21:44:26 -07:00
digi_acceleport.c
empeg.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
ezusb_convert.pl
ezusb.c
ftdi_sio.c [PATCH] USB: ftdi_sio: avoid losing received data in tty-ldisc 2005-06-09 01:38:15 -07:00
ftdi_sio.h [PATCH] USB: ftdi_sio: new PID for ELV UM100 2005-05-31 14:13:59 -07:00
garmin_gps.c
generic.c
hp4x.c [PATCH] USB: fix up the HP49G+ Calculator USB Serial driver 2005-04-22 15:06:59 -07:00
io_16654.h
io_edgeport.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
io_edgeport.h
io_fw_boot2.h
io_fw_boot.h
io_fw_down2.h
io_fw_down3.h
io_fw_down.h
io_ionsp.h
io_tables.h
io_ti.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
io_ti.h
io_usbvend.h [PATCH] USB: Spelling fixes for drivers/usb. 2005-05-03 23:31:52 -07:00
ipaq.c
ipaq.h
ipw.c
ir-usb.c
Kconfig [PATCH] USB: add Option Card driver 2005-06-03 00:04:29 -07:00
keyspan_mpr_fw.h
keyspan_pda_fw.h
keyspan_pda.c
keyspan_pda.S
keyspan_usa18x_fw.h
keyspan_usa19_fw.h
keyspan_usa19qi_fw.h
keyspan_usa19qw_fw.h
keyspan_usa19w_fw.h
keyspan_usa26msg.h
keyspan_usa28_fw.h
keyspan_usa28msg.h
keyspan_usa28x_fw.h
keyspan_usa28xa_fw.h
keyspan_usa28xb_fw.h
keyspan_usa49msg.h
keyspan_usa49w_fw.h
keyspan_usa49wlc_fw.h
keyspan_usa90msg.h [PATCH] USB: Spelling fixes for drivers/usb. 2005-05-03 23:31:52 -07:00
keyspan.c
keyspan.h
kl5kusb105.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
kl5kusb105.h
kobil_sct.c
kobil_sct.h
Makefile [PATCH] USB: add Option Card driver 2005-06-03 00:04:29 -07:00
Makefile-keyspan_pda_fw
mct_u232.c
mct_u232.h
omninet.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
option.c [PATCH] USB: add Option Card driver 2005-06-03 00:04:29 -07:00
pl2303.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
pl2303.h
safe_serial.c
ti_fw_3410.h
ti_fw_5052.h
ti_usb_3410_5052.c [PATCH] USB: kfree cleanup for drivers/usb/* - no need to check for NULL 2005-04-18 17:39:34 -07:00
ti_usb_3410_5052.h
usb-serial.c [PATCH] USB: fix usb-serial generic initialization 2005-05-31 14:13:59 -07:00
usb-serial.h
visor.c
visor.h
whiteheat_fw.h
whiteheat.c
whiteheat.h
xircom_pgs_fw.h
xircom_pgs.S