From: "guoyin.chen" <guoyin.chen@xxxxxxxxxxxxx> In android without shell environment (androidboot.selinux enable), do suspend/resume test, console terminal has no message print out. The issue is reproduced at i.MX serial platforms like i.MX6Q/DL/SX. In common code, cons->cflag is cleared to zero in .uart_port_startup(), but after resume back, use the cons->cflag to set termios. ...................... uart_port_startup-> uport->cons->cflag = 0; uart_resume_port()-> termios.c_cflga = uport->cons->cflag; ... uport->ops->set_termios(uport, &termios, NULL); ...................... If the console baud rate is 115200 bps, after Android resume back, the console baud rate is initialized to 9600 bps. So the patch save the console cflag. Signed-off-by: Fugang Duan <B38611@xxxxxxxxxxxxx> --- drivers/tty/serial/serial_core.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index 0b7bb12..4b21091 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -162,10 +162,9 @@ static int uart_port_startup(struct tty_struct *tty, struct uart_state *state, retval = uport->ops->startup(uport); if (retval == 0) { - if (uart_console(uport) && uport->cons->cflag) { + if (uart_console(uport) && uport->cons->cflag) tty->termios.c_cflag = uport->cons->cflag; - uport->cons->cflag = 0; - } + /* * Initialise the hardware port settings. */ -- 1.7.8 -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html