summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2024-07-31 15:28:48 +0200
committerJohan Hovold <johan@kernel.org>2024-08-26 15:29:27 +0200
commit4c0d9477ba69a417c698aec1d3012e188cf97add (patch)
tree1a75d35c040a2c917614ed768aac092fb38064e1 /drivers/usb
parentUSB: serial: drop driver owner initialization (diff)
downloadlinux-4c0d9477ba69a417c698aec1d3012e188cf97add.tar.xz
linux-4c0d9477ba69a417c698aec1d3012e188cf97add.zip
USB: serial: kobil_sct: restore initial terminal settings
Commit 6a6c8b362be3 ("usb, kobil: Sort out some bogus tty handling") intended to fix and clean up the device-specific initial terminal settings but instead confused the termios input and local control flags and re-enabled ICRNL and IXON. Drop the bogus masking of l-flags from the default i-flags (which has no effect) and restore the original device-specific i-flags. Fixes: 6a6c8b362be3 ("usb, kobil: Sort out some bogus tty handling") Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/kobil_sct.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 5eb59ac3e564..464433be2034 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -155,8 +155,7 @@ static void kobil_init_termios(struct tty_struct *tty)
{
/* Default to echo off and other sane device settings */
tty->termios.c_lflag = 0;
- tty->termios.c_iflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
- tty->termios.c_iflag |= IGNBRK | IGNPAR | IXOFF;
+ tty->termios.c_iflag = IGNBRK | IGNPAR | IXOFF;
/* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
tty->termios.c_oflag &= ~ONLCR;
}