serial: core: Preserve termios c_cflag for console resume
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 9 Jul 2014 13:21:14 +0000 (09:21 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Sep 2014 23:28:35 +0000 (16:28 -0700)
commitfca04198d5b8e48a535df52ada1b6b384474cacc
tree75254f9c4fd15130c0b4497ab8b490a7696c6ce0
parent0ec5ac16b3d5b70cd0b34249addea6fb104e4305
serial: core: Preserve termios c_cflag for console resume

commit ae84db9661cafc63d179e1d985a2c5b841ff0ac4 upstream.

When a tty is opened for the serial console, the termios c_cflag
settings are inherited from the console line settings.
However, if the tty is subsequently closed, the termios settings
are lost. This results in a garbled console if the console is later
suspended and resumed.

Preserve the termios c_cflag for the serial console when the tty
is shutdown; this reflects the most recent line settings.

Fixes: Bugzilla #69751, 'serial console does not wake from S3'
Reported-by: Valerio Vanni <valerio.vanni@inwind.it>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c