diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-10 17:37:43 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-10 17:37:43 +0000 |
commit | 4b9c8ddadce3ec70fa5d93875adeda861b21c84e (patch) | |
tree | 6ed53e819e5c763f751ff968a650b236d2d02545 /drivers/usb/serial/ftdi_sio.c | |
parent | 51ad557e21b8713f3abc286c14bca4ed01b8e56d (diff) | |
parent | 1569265782ef26ed77ce45ebeb0676f11d4c114a (diff) |
Merge tag 'v3.10.29' into linux-linaro-lsk
This is the 3.10.29 stable release
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 92549cc4665..089248c1d59 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -2132,10 +2132,20 @@ static void ftdi_set_termios(struct tty_struct *tty, } /* - * All FTDI UART chips are limited to CS7/8. We won't pretend to + * All FTDI UART chips are limited to CS7/8. We shouldn't pretend to * support CS5/6 and revert the CSIZE setting instead. + * + * CS5 however is used to control some smartcard readers which abuse + * this limitation to switch modes. Original FTDI chips fall back to + * eight data bits. + * + * TODO: Implement a quirk to only allow this with mentioned + * readers. One I know of (Argolis Smartreader V1) + * returns "USB smartcard server" as iInterface string. + * The vendor didn't bother with a custom VID/PID of + * course. */ - if ((C_CSIZE(tty) != CS8) && (C_CSIZE(tty) != CS7)) { + if (C_CSIZE(tty) == CS6) { dev_warn(ddev, "requested CSIZE setting not supported\n"); termios->c_cflag &= ~CSIZE; @@ -2182,6 +2192,9 @@ no_skip: urb_value |= FTDI_SIO_SET_DATA_PARITY_NONE; } switch (cflag & CSIZE) { + case CS5: + dev_dbg(ddev, "Setting CS5 quirk\n"); + break; case CS7: urb_value |= 7; dev_dbg(ddev, "Setting CS7\n"); |