[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220628094155.26297-1-ilpo.jarvinen@linux.intel.com>
Date: Tue, 28 Jun 2022 12:41:55 +0300
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Pali Rohár <pali@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Allen Yan <yanwei@...vell.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Gregory CLEMENT <gregory.clement@...tlin.com>,
linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH] serial: mvebu: Apply old baudrate to termios
A fallback baud rate was derived from old termios but got never applied
to (new/current) termios. Old termios is dropped once ->set_termios()
call chain completes, only termios persists the values. Encode also the
old baud rate into termios.
Fixes: 68a0db1d7da2 ("serial: mvebu-uart: add function to change baudrate")
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
drivers/tty/serial/mvebu-uart.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/mvebu-uart.c b/drivers/tty/serial/mvebu-uart.c
index 0429c2a54290..12a79018697f 100644
--- a/drivers/tty/serial/mvebu-uart.c
+++ b/drivers/tty/serial/mvebu-uart.c
@@ -592,10 +592,9 @@ static void mvebu_uart_set_termios(struct uart_port *port,
if (old)
baud = uart_get_baud_rate(port, old, NULL,
min_baud, max_baud);
- } else {
- tty_termios_encode_baud_rate(termios, baud, baud);
- uart_update_timeout(port, termios->c_cflag, baud);
}
+ tty_termios_encode_baud_rate(termios, baud, baud);
+ uart_update_timeout(port, termios->c_cflag, baud);
/* Only the following flag changes are supported */
if (old) {
--
tg: (f287f971e256..) fix/mvebu-apply-old-baud (depends on: tty-next)
Powered by blists - more mailing lists