Skip to content

Commit 98e3059

Browse files
author
Desnes Nunes
committed
USB: serial: xr: avoid requesting zero DTE rate
JIRA: https://issues.redhat.com/browse/RHEL-67057 commit 63b8ed2 Author: Johan Hovold <johan@kernel.org> Date: Tue, 29 Nov 2022 15:18:57 +0100 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> Signed-off-by: Desnes Nunes <desnesn@redhat.com>
1 parent 8718f8e commit 98e3059

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/usb/serial/xr_serial.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,8 +749,6 @@ static void xr_cdc_set_line_coding(struct tty_struct *tty,
749749

750750
if (tty->termios.c_ospeed)
751751
lc->dwDTERate = cpu_to_le32(tty->termios.c_ospeed);
752-
else if (old_termios)
753-
lc->dwDTERate = cpu_to_le32(old_termios->c_ospeed);
754752
else
755753
lc->dwDTERate = cpu_to_le32(9600);
756754

0 commit comments

Comments
 (0)