76854ceac3
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> |
||
---|---|---|
.. | ||
airprime.c | ||
belkin_sa.c | ||
belkin_sa.h | ||
bus.c | ||
console.c | ||
cp2101.c | ||
cyberjack.c | ||
cypress_m8.c | ||
cypress_m8.h | ||
digi_acceleport.c | ||
empeg.c | ||
ezusb_convert.pl | ||
ezusb.c | ||
ftdi_sio.c | ||
ftdi_sio.h | ||
garmin_gps.c | ||
generic.c | ||
hp4x.c | ||
io_16654.h | ||
io_edgeport.c | ||
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 | ||
io_ti.h | ||
io_usbvend.h | ||
ipaq.c | ||
ipaq.h | ||
ipw.c | ||
ir-usb.c | ||
Kconfig | ||
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 | ||
keyspan.c | ||
keyspan.h | ||
kl5kusb105.c | ||
kl5kusb105.h | ||
kobil_sct.c | ||
kobil_sct.h | ||
Makefile | ||
Makefile-keyspan_pda_fw | ||
mct_u232.c | ||
mct_u232.h | ||
omninet.c | ||
option.c | ||
pl2303.c | ||
pl2303.h | ||
safe_serial.c | ||
ti_fw_3410.h | ||
ti_fw_5052.h | ||
ti_usb_3410_5052.c | ||
ti_usb_3410_5052.h | ||
usb-serial.c | ||
usb-serial.h | ||
visor.c | ||
visor.h | ||
whiteheat_fw.h | ||
whiteheat.c | ||
whiteheat.h | ||
xircom_pgs_fw.h | ||
xircom_pgs.S |