Skip to content

Commit

Permalink
USB: serial: kobil_sct: restore initial terminal settings
Browse files Browse the repository at this point in the history
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 <johan@kernel.org>
  • Loading branch information
jhovold committed Aug 26, 2024
1 parent 6d24358 commit 4c0d947
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/usb/serial/kobil_sct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 4c0d947

Please sign in to comment.