All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] USB: serial: kobil_sct: restore initial terminal settings
@ 2024-07-31 13:28 Johan Hovold
  0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2024-07-31 13:28 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb, linux-kernel

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>
---
 drivers/usb/serial/kobil_sct.c | 3 +--
 1 file changed, 1 insertion(+), 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;
 }
-- 
2.44.2


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-31 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31 13:28 [PATCH] USB: serial: kobil_sct: restore initial terminal settings Johan Hovold

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.