OpenCloudOS-Kernel/drivers/usb/serial
Jarkko Huijts 6f602912c9 usb: serial: ftdi_sio: Add missing chars_in_buffer function
The driver does not wait until the hardware buffer (for data from the PC to the
UART line) is drained when tcdrain or close is called in an application.
Solution: Implement a chars_in_buffer function that checks both the software
and hardware buffer. If the TEMT (TX empty) bit of the line status register
indicates the hw buffer is not empty, let the function return at least 1. This
has been verified to work correctly with an FT232RL. The check on the hw buffer
can not be done for the original SIO device.

Signed-off-by: Jarkko Huijts <jarkko.huijts@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25 09:42:26 -07:00
..
Kconfig USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc 2012-09-26 14:20:28 -07:00
Makefile USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc 2012-09-26 14:20:28 -07:00
Makefile-keyspan_pda_fw
aircable.c USB: serial: aircable.c: remove debug module parameter 2012-09-14 12:31:18 -07:00
ark3116.c USB: ark3116: fix NULL-pointer dereference 2012-10-16 10:25:54 -07:00
belkin_sa.c USB: belkin_sa: fix port-data memory leak 2012-10-16 10:25:54 -07:00
belkin_sa.h USB: belkin_sa.h: checkpatch cleanups 2010-05-20 13:21:46 -07:00
bus.c usb: serial: prevent suspend/resume from racing against probe/remove 2012-08-10 11:51:43 -07:00
ch341.c USB: Serial: ch341.c: remove debug module parameter 2012-09-18 10:15:17 +01:00
console.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
cp210x.c USB: cp210x: fix port-data memory leak 2012-10-16 10:25:54 -07:00
cyberjack.c USB: cyberjack: fix port-data memory leak 2012-10-16 10:25:54 -07:00
cypress_m8.c USB: cypress_m8: fix port-data memory leak 2012-10-17 13:47:57 -07:00
cypress_m8.h USB: cypress_m8.h: checkpatch cleanups 2010-05-20 13:21:46 -07:00
digi_acceleport.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
empeg.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
ezusb_convert.pl
f81232.c USB: f81232: fix port-data memory leak 2012-10-17 13:47:58 -07:00
ftdi_sio.c usb: serial: ftdi_sio: Add missing chars_in_buffer function 2012-10-25 09:42:26 -07:00
ftdi_sio.h USB: ftdi_sio: add support for FT-X series devices 2012-03-14 15:43:05 -07:00
ftdi_sio_ids.h USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support 2012-09-24 13:42:42 -07:00
funsoft.c USB: serial: funsoft.c: remove debug module parameter 2012-09-14 12:31:27 -07:00
garmin_gps.c USB: fix port probing and removal in garmin_gps 2012-10-16 10:25:55 -07:00
generic.c USB: Serial: usb-serial: remove debug module parameter 2012-09-18 16:05:17 +01:00
hp4x.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
io_16654.h
io_edgeport.c USB: io_edgeport: fix port-data memory leak 2012-10-17 13:47:58 -07:00
io_edgeport.h Fix common misspellings 2011-03-31 11:26:23 -03:00
io_ionsp.h USB: io_edgeport: checkpatch cleanups 2010-05-20 13:21:47 -07:00
io_tables.h USB: io_edgeport: fix port-data memory leak 2012-10-17 13:47:58 -07:00
io_ti.c USB: io_ti: fix sysfs-attribute creation 2012-10-18 08:08:47 -07:00
io_ti.h USB: io_edgeport: checkpatch cleanups 2010-05-20 13:21:47 -07:00
io_usbvend.h USB: io_edgeport: checkpatch cleanups 2010-05-20 13:21:47 -07:00
ipaq.c USB: serial: ipaq.c: remove debug module parameter 2012-09-14 12:31:30 -07:00
ipw.c USB: serial: ipw.c: remove debug module parameter 2012-09-14 12:31:32 -07:00
ir-usb.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
iuu_phoenix.c USB: iuu_phoenix: fix sysfs-attribute creation 2012-10-18 08:08:47 -07:00
iuu_phoenix.h
keyspan.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
keyspan.h USB: serial: keyspan: remove dbg() usage 2012-09-14 16:30:23 -07:00
keyspan_pda.c USB: keyspan_pda: fix port-data memory leak 2012-10-17 13:47:58 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
kl5kusb105.c USB: kl5kusb105: fix port-data memory leak 2012-10-17 13:47:59 -07:00
kl5kusb105.h USB: kl5kusb105.h: checkpatch cleanups 2010-05-20 13:21:47 -07:00
kobil_sct.c USB: kobil_sct: fix port-data memory leak 2012-10-17 13:47:58 -07:00
kobil_sct.h USB: kobil_sct.h: checkpatch cleanups 2010-05-20 13:21:47 -07:00
mct_u232.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
mct_u232.h Update broken web addresses in the kernel. 2010-10-18 11:03:14 +02:00
metro-usb.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
mos7720.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
mos7840.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
moto_modem.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
navman.c USB: Serial: navman.c: remove debug module parameter 2012-09-18 10:16:01 +01:00
omninet.c USB: Serial: omninet: Fix compiler warning. 2012-09-18 15:27:50 +01:00
opticon.c USB: Serial: opticon.c: remove debug module parameter 2012-09-18 10:16:08 +01:00
option.c USB: option: add more ZTE devices 2012-10-18 08:27:21 -07:00
oti6858.c USB: oti6858: fix port-data memory leak 2012-10-17 13:47:59 -07:00
oti6858.h
pl2303.c USB: pl2303: fix port-data memory leak 2012-10-16 10:25:54 -07:00
pl2303.h USB: serial: pl2303: rm duplicate id 2011-11-15 10:06:15 -08:00
qcaux.c USB: qcaux: add Pantech vendor class match 2012-09-21 09:42:02 -07:00
qcserial.c USB: serial: qcserial.c: remove debug module parameter 2012-09-14 12:31:47 -07:00
quatech2.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
safe_serial.c USB: serial: safe-serial: fix up printk() usage 2012-09-18 17:07:24 +01:00
siemens_mpi.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
sierra.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
spcp8x5.c USB: spcp8x5: fix port-data memory leak 2012-10-17 13:48:00 -07:00
ssu100.c USB: ssu100: fix port-data memory leak 2012-10-17 13:47:59 -07:00
symbolserial.c USB: Serial: symbolserial.c: remove debug module parameter 2012-09-18 10:16:20 +01:00
ti_usb_3410_5052.c USB: ti_usb_3410_5052: fix port-data memory leak 2012-10-17 13:47:59 -07:00
ti_usb_3410_5052.h USB: serial: ti_usb_3410_5052: Add support for the FRI2 serial console 2012-05-11 15:14:07 -07:00
usb-serial.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
usb-wwan.h usb: usb_wwan: replace release and disconnect with a port_remove hook 2012-08-10 11:51:43 -07:00
usb_debug.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
usb_wwan.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
visor.c USB: Serial: visor.c: remove debug module parameter 2012-09-18 10:16:28 +01:00
visor.h USB: visor.h: checkpatch cleanups 2010-05-20 13:21:47 -07:00
vivopay-serial.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
whiteheat.c USB merge for 3.7-rc1 2012-10-01 13:23:01 -07:00
whiteheat.h
zio.c USB: serial: rework usb_serial_register/deregister_drivers() 2012-05-08 15:46:14 -07:00
zte_ev.c USB: serial: add zte_ev.c driver 2012-09-13 10:15:14 -07:00