summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Bartosik <ukaszb@chromium.org>2025-06-27 17:41:21 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-07-10 16:03:18 +0200
commit897d1170c24900fdfb54f941b480a4459d45f043 (patch)
tree693345107653b2c4e280919b3b4a63a6ec7ae883
parent7609899eb6b70b536123eb58eeab27c764752b82 (diff)
downloadlinux-897d1170c24900fdfb54f941b480a4459d45f043.tar.gz
linux-897d1170c24900fdfb54f941b480a4459d45f043.tar.bz2
linux-897d1170c24900fdfb54f941b480a4459d45f043.zip
xhci: dbctty: disable ECHO flag by default
commit 2b857d69a5e116150639a0c6c39c86cc329939ee upstream. When /dev/ttyDBC0 device is created then by default ECHO flag is set for the terminal device. However if data arrives from a peer before application using /dev/ttyDBC0 applies its set of terminal flags then the arriving data will be echoed which might not be desired behavior. Fixes: 4521f1613940 ("xhci: dbctty: split dbc tty driver registration and unregistration functions.") Cc: stable <stable@kernel.org> Signed-off-by: Łukasz Bartosik <ukaszb@chromium.org> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/stable/20250610111802.18742-1-ukaszb%40chromium.org Link: https://lore.kernel.org/r/20250627144127.3889714-4-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/usb/host/xhci-dbgtty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-dbgtty.c b/drivers/usb/host/xhci-dbgtty.c
index 0266c2f5bc0d..aa689fbd3dce 100644
--- a/drivers/usb/host/xhci-dbgtty.c
+++ b/drivers/usb/host/xhci-dbgtty.c
@@ -585,6 +585,7 @@ int dbc_tty_init(void)
dbc_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
dbc_tty_driver->subtype = SERIAL_TYPE_NORMAL;
dbc_tty_driver->init_termios = tty_std_termios;
+ dbc_tty_driver->init_termios.c_lflag &= ~ECHO;
dbc_tty_driver->init_termios.c_cflag =
B9600 | CS8 | CREAD | HUPCL | CLOCAL;
dbc_tty_driver->init_termios.c_ispeed = 9600;