diff options
author | Johan Hovold <johan@kernel.org> | 2022-11-29 15:18:57 +0100 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2022-11-30 12:28:51 +0100 |
commit | 63b8ed26cd093ecc1bcdd1fd841f238a52c11031 (patch) | |
tree | ac9326177c7bd7a49e717edf0411f33404c7dbbc /drivers/usb/serial/xr_serial.c | |
parent | USB: serial: cp210x: add support for B0 hangup (diff) | |
download | linux-63b8ed26cd093ecc1bcdd1fd841f238a52c11031.tar.xz linux-63b8ed26cd093ecc1bcdd1fd841f238a52c11031.zip |
USB: serial: xr: avoid requesting zero DTE rate
When the requested line speed is B0 (hangup) there is no need to use the
current speed in the line-coding request. This specifically avoids
requesting a zero DTE rate when the current speed is B0, which could
potentially confuse buggy firmware.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/xr_serial.c')
-rw-r--r-- | drivers/usb/serial/xr_serial.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/usb/serial/xr_serial.c b/drivers/usb/serial/xr_serial.c index f3811e060a44..fdb0aae546c3 100644 --- a/drivers/usb/serial/xr_serial.c +++ b/drivers/usb/serial/xr_serial.c @@ -749,8 +749,6 @@ static void xr_cdc_set_line_coding(struct tty_struct *tty, if (tty->termios.c_ospeed) lc->dwDTERate = cpu_to_le32(tty->termios.c_ospeed); - else if (old_termios) - lc->dwDTERate = cpu_to_le32(old_termios->c_ospeed); else lc->dwDTERate = cpu_to_le32(9600); |