alistair23-linux/drivers
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
..
acorn
acpi [PATCH] ACPI build fix 2005-05-27 08:15:05 -07:00
atm [ATM]: [drivers] kill pointless NULL checks and casts before kfree() 2005-06-02 13:04:07 -07:00
base [PATCH] driver core: restore event order for device_add() 2005-05-23 16:08:12 -07:00
block [PATCH] USB: fix ub issues 2005-06-09 01:38:11 -07:00
bluetooth
cdrom [PATCH] ppc64 iSeries: make virtual DVD-RAMs writable again 2005-05-28 11:14:00 -07:00
char [PATCH] Replace check_bridge_mode() with (bridge->mode & AGSTAT_MODE_3_0). 2005-06-07 12:35:44 -07:00
cpufreq [PATCH] cpufreq-stats driver updates 2005-05-31 19:04:05 -07:00
crypto
dio
eisa
fc4
firmware [PATCH] pcdp.c build fix 2005-05-31 14:54:18 -07:00
i2c [PATCH] I2C: ALI1563 SMBus driver fix 2005-05-31 14:03:05 -07:00
ide [PATCH] PCI: amd74xx patch for new NVIDIA device IDs 2005-05-31 14:26:38 -07:00
ieee1394 [PATCH] ieee1394: fix premature expiry of async packets 2005-05-17 07:59:24 -07:00
infiniband [PATCH] IB: fix endianness of path record MTU field 2005-05-25 15:31:28 -07:00
input [PATCH] input: disable scroll feature on AT keyboards 2005-06-07 13:39:26 -07:00
isdn
macintosh [PATCH] ppc32: Fix cpufreq vs. sleep issue 2005-05-28 11:14:01 -07:00
mca
md [PATCH] dm: Handle READA requests in dm-mpath.c 2005-06-08 16:21:14 -07:00
media [PATCH] dvb: Small cleanup 2005-05-28 16:46:10 -07:00
message
misc
mmc [PATCH] MMC: Proper MMC command classes support 2005-05-21 10:27:02 +01:00
mtd
net [TG3]: Update driver version and release date. 2005-06-08 14:15:52 -07:00
nubus
oprofile
parisc
parport [PATCH] ISA_DMA Kconfig fixes - part 2 (parport_pc) 2005-05-04 07:33:13 -07:00
pci [PATCH] PCI Hotplug: fix CPCI reference counting bug 2005-06-09 01:37:59 -07:00
pcmcia [PATCH] pcmcia/ds: handle any error code 2005-05-17 07:59:21 -07:00
pnp
s390 Automatic merge of /spare/repo/netdev-2.6 branch qeth 2005-05-25 22:11:06 -04:00
sbus [SPARC]: Eliminate local MIN/MAX macros in drivers/sbus/char/aurora.c 2005-05-15 16:01:50 -07:00
scsi Automatic merge of rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6 2005-06-03 08:54:02 -07:00
serial [PATCH] Serial: remove unused variable in sa1100 driver 2005-06-08 19:26:47 +01:00
sh
sn
tc
telephony [PATCH] ixj* - compile warning cleanup 2005-05-05 16:36:48 -07:00
usb [PATCH] USB: ftdi_sio: avoid losing received data in tty-ldisc 2005-06-09 01:38:15 -07:00
video [PATCH] intelfb section fix 2005-05-28 16:46:09 -07:00
w1
zorro
Kconfig
Makefile