* [PATCH] USB: serial: xr: avoid requesting zero DTE rate
@ 2022-11-29 14:18 Johan Hovold
2022-11-30 11:09 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Johan Hovold @ 2022-11-29 14:18 UTC (permalink / raw)
To: Johan Hovold; +Cc: linux-usb, linux-kernel
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.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/usb/serial/xr_serial.c | 2 --
1 file changed, 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);
--
2.37.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-30 11:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29 14:18 [PATCH] USB: serial: xr: avoid requesting zero DTE rate Johan Hovold
2022-11-30 11:09 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox