Skip to content

Commit 4c0d947

Browse files
committed
USB: serial: kobil_sct: restore initial terminal settings
Commit 6a6c8b3 ("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: 6a6c8b3 ("usb, kobil: Sort out some bogus tty handling") Signed-off-by: Johan Hovold <[email protected]>
1 parent 6d24358 commit 4c0d947

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/serial/kobil_sct.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,7 @@ static void kobil_init_termios(struct tty_struct *tty)
155155
{
156156
/* Default to echo off and other sane device settings */
157157
tty->termios.c_lflag = 0;
158-
tty->termios.c_iflag &= ~(ISIG | ICANON | ECHO | IEXTEN | XCASE);
159-
tty->termios.c_iflag |= IGNBRK | IGNPAR | IXOFF;
158+
tty->termios.c_iflag = IGNBRK | IGNPAR | IXOFF;
160159
/* do NOT translate CR to CR-NL (0x0A -> 0x0A 0x0D) */
161160
tty->termios.c_oflag &= ~ONLCR;
162161
}

0 commit comments

Comments
 (0)