]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
serial: uartlite: Fix BRKINT clearing
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 19 May 2022 08:18:00 +0000 (11:18 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Jun 2022 16:41:18 +0000 (18:41 +0200)
[ Upstream commit 3f7fed405c118607d4d42255f2572072db728399 ]

BRKINT is within c_iflag rather than c_cflag.

Fixes: ea017f5853e9 (tty: serial: uartlite: Prevent changing fixed parameters)
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220519081808.3776-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/tty/serial/uartlite.c

index e1fa52d31474f6e6d896a8c71f83eb31b971df93..7c788c697f3e1371f0fce47117d17648ec2d5f38 100644 (file)
@@ -321,7 +321,8 @@ static void ulite_set_termios(struct uart_port *port, struct ktermios *termios,
        struct uartlite_data *pdata = port->private_data;
 
        /* Set termios to what the hardware supports */
-       termios->c_cflag &= ~(BRKINT | CSTOPB | PARENB | PARODD | CSIZE);
+       termios->c_iflag &= ~BRKINT;
+       termios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CSIZE);
        termios->c_cflag |= pdata->cflags & (PARENB | PARODD | CSIZE);
        tty_termios_encode_baud_rate(termios, pdata->baud, pdata->baud);