diff options
author | Johan Hovold <johan@kernel.org> | 2021-01-26 14:59:17 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2021-02-01 14:06:11 +0100 |
commit | 528222d0c8ce93e435a95cd1e476b60409dd5381 (patch) | |
tree | 700ed84bdb82775aa14ea1607df00989fb60fc31 /drivers | |
parent | e2f2dea34cf16e67b347ea7e9805864f03d16dcc (diff) | |
download | linux-528222d0c8ce93e435a95cd1e476b60409dd5381.tar.gz linux-528222d0c8ce93e435a95cd1e476b60409dd5381.tar.bz2 linux-528222d0c8ce93e435a95cd1e476b60409dd5381.zip |
USB: serial: ftdi_sio: fix FTX sub-integer prescaler
The most-significant bit of the sub-integer-prescaler index is set in
the high byte of the baudrate request wIndex also for FTX devices.
This fixes rates like 1152000 which got mapped to 1.2 MBd.
Reported-by: Vladimir <svv75@mail.ru>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=210351
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 94398f89e600..4168801b9595 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -1386,8 +1386,9 @@ static int change_speed(struct tty_struct *tty, struct usb_serial_port *port) index_value = get_ftdi_divisor(tty, port); value = (u16)index_value; index = (u16)(index_value >> 16); - if ((priv->chip_type == FT2232C) || (priv->chip_type == FT2232H) || - (priv->chip_type == FT4232H) || (priv->chip_type == FT232H)) { + if (priv->chip_type == FT2232C || priv->chip_type == FT2232H || + priv->chip_type == FT4232H || priv->chip_type == FT232H || + priv->chip_type == FTX) { /* Probably the BM type needs the MSB of the encoded fractional * divider also moved like for the chips above. Any infos? */ index = (u16)((index << 8) | priv->interface); |