linux-stable/drivers/usb/serial
Frank Schaefer 25b8286805 USB-serial: pl2303: fix baud rate handling in case of unsupported values
According to the datasheets, the PL2303 supports a set of 25 baudrates.
The baudrate is set as a 4 byte value directly.

During my experiments with device 067b:2303 (PL2303X), I noticed that
 - the bridge-controller always uses 9600 baud if invalid/unsupported baud rate
   values are set
 - the baud rate value returned by usb_control_msg(..., GET_LINE_REQUEST, ...)
   does not reflect the actually used baudrate. Always the last set value is
   returned, even if it was invalid and not used by the controller.

This patch fixes the following issues with the current code:
1.) make sure that only supported baudrates are set (are there any buggy
    chip revisions out there which don't "like" other values... ?).
2.) always set the baudrate to the next nearest supported baudrate.
3.) applications can now read back the resulting baudrate properly, because
    tty_encode_baud_rate(...) is now fed with the actually used baudrate.

Signed-off-by: Frank Schaefer <schaefer.frank@gmx.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-23 06:46:36 -07:00
..
aircable.c USB: usb-serial: replace shutdown with disconnect, release 2009-06-15 21:44:47 -07:00
ark3116.c USB: ark3116: add IrDA support for Gembird UIR-22 2009-09-23 06:46:32 -07:00
belkin_sa.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
belkin_sa.h
bus.c USB: usb-serial: call port_probe and port_remove at the right times 2009-06-15 21:44:47 -07:00
ch341.c USb: Break support for WinChipHead CH341 340 USB->Serial "chip" 2009-09-23 06:46:35 -07:00
ChangeLog.history trivial: Fix misspelling of firmware 2009-03-30 15:21:59 +02:00
console.c USB serial: update the console driver 2009-09-19 13:13:42 -07:00
cp210x.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
cyberjack.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
cypress_m8.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
cypress_m8.h trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
digi_acceleport.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
empeg.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
ezusb.c
ezusb_convert.pl
ftdi_sio.c USB: serial: ftdi: handle gnICE+ JTAG adaptors 2009-09-23 06:46:16 -07:00
ftdi_sio.h USB: serial: ftdi: handle gnICE+ JTAG adaptors 2009-09-23 06:46:16 -07:00
funsoft.c
garmin_gps.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
generic.c USB: use kfifo to buffer usb-generic serial writes 2009-09-23 06:46:34 -07:00
hp4x.c
io_16654.h
io_edgeport.c trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
io_edgeport.h
io_ionsp.h
io_tables.h USB: usb-serial: replace shutdown with disconnect, release 2009-06-15 21:44:47 -07:00
io_ti.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
io_ti.h
io_usbvend.h
ipaq.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ipaq.h
ipw.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ir-usb.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
iuu_phoenix.c USB: iuu_phoenix: add a way to select the default VCC 2009-09-23 06:46:36 -07:00
iuu_phoenix.h
Kconfig trivial: fix typos/grammar errors in Kconfig texts 2009-03-30 15:22:01 +02:00
keyspan.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
keyspan.h tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
keyspan_pda.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
keyspan_usa26msg.h
keyspan_usa28msg.h
keyspan_usa49msg.h
keyspan_usa67msg.h
keyspan_usa90msg.h
kl5kusb105.c trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
kl5kusb105.h
kobil_sct.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
kobil_sct.h
Makefile USB: serial: rename cp2101 driver to cp210x 2009-03-24 16:20:44 -07:00
Makefile-keyspan_pda_fw
mct_u232.c tty: USB: serial/mct_u232, fix tty refcnt 2009-09-19 13:13:37 -07:00
mct_u232.h
mos7720.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
mos7840.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
moto_modem.c USB: serial: Spelling correction in Motorola USB Phone driver 2009-09-23 06:46:29 -07:00
navman.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
omninet.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
opticon.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
option.c USB: serial: full autosuspend support for the option driver 2009-09-23 06:46:25 -07:00
oti6858.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
oti6858.h
pl2303.c USB-serial: pl2303: fix baud rate handling in case of unsupported values 2009-09-23 06:46:36 -07:00
pl2303.h USB: serial: pl2303: new hardware support - sanwa multimeter 2009-09-23 06:46:15 -07:00
qcserial.c USB: qcserial: Add extra device IDs 2009-04-17 10:50:24 -07:00
safe_serial.c
siemens_mpi.c
sierra.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
spcp8x5.c trivial: remove unnecessary semicolons 2009-09-21 15:14:58 +02:00
symbolserial.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ti_usb_3410_5052.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
ti_usb_3410_5052.h USB: two more usb ids for ti_usb_3410_5052 2009-02-09 11:19:48 -08:00
usb-serial.c USB: use kfifo to buffer usb-generic serial writes 2009-09-23 06:46:34 -07:00
usb_debug.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
visor.c tty: USB does not need the filp argument in the drivers 2009-09-19 13:13:26 -07:00
visor.h
whiteheat.c tty: USB serial termios bits 2009-09-19 13:13:33 -07:00
whiteheat.h