diff options
author | 2022-02-25 15:39:21 +0800 | |
---|---|---|
committer | 2022-02-26 10:03:21 +0100 | |
commit | 19b2ba0baffcd707eecd718da4941e74af341e4f (patch) | |
tree | 968ccd2ff6ca9d9c55779e481e5841866744e68d /drivers/tty | |
parent | tty: serial: meson: Make some bit of the REG5 register writable (diff) | |
download | linux-19b2ba0baffcd707eecd718da4941e74af341e4f.tar.gz linux-19b2ba0baffcd707eecd718da4941e74af341e4f.tar.bz2 linux-19b2ba0baffcd707eecd718da4941e74af341e4f.zip |
tty: serial: meson: The system stuck when you run the stty command on the console to change the baud rate
Start the console and run the following commands in turn:
stty -F /dev/ttyAML0 115200 and stty -F /dev/ttyAML0 921600. The
system will stuck.
Signed-off-by: Yu Tu <yu.tu@amlogic.com>
Link: https://lore.kernel.org/r/20220225073922.3947-6-yu.tu@amlogic.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/meson_uart.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/meson_uart.c b/drivers/tty/serial/meson_uart.c index ba8dc203b9cb..d19349ead738 100644 --- a/drivers/tty/serial/meson_uart.c +++ b/drivers/tty/serial/meson_uart.c @@ -365,8 +365,13 @@ static void meson_uart_set_termios(struct uart_port *port, writel(val, port->membase + AML_UART_CONTROL); baud = uart_get_baud_rate(port, termios, old, 50, 4000000); + + spin_unlock_irqrestore(&port->lock, flags); + meson_uart_change_speed(port, baud); + spin_lock_irqsave(&port->lock, flags); + port->read_status_mask = AML_UART_TX_FIFO_WERR; if (iflags & INPCK) port->read_status_mask |= AML_UART_PARITY_ERR | |