From: Jason Wang Date: Sat, 21 Aug 2010 07:14:41 +0000 (+0800) Subject: serial-core: skip call set_termios/console_start when no_console_suspend X-Git-Tag: v2.6.37-rc1~155^2~33 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1;p=~emulex%2Finfiniband.git serial-core: skip call set_termios/console_start when no_console_suspend The commit 4547be7 rewrites suspend and resume functions, this introduces a problem on the OMAP3EVM platoform. when the kernel boots with no_console_suspend and we suspend the kernel, then resume it, the serial console will be not usable. This problem should be common for all platforms. The cause for this problem is that when enter suspend, if we choose no_console_suspend, the console_stop will be skiped. But in resume function, the console port will be set to uninitialized state by calling set_termios function and the console_start is called without checking whether the no_console_suspend is set, Now fix it. Signed-off-by: Jason Wang Acked-by: Stanislav Brabec Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index cd8511298bc..ff21200f94f 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c @@ -2065,7 +2065,7 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) /* * Re-enable the console device after suspending. */ - if (uart_console(uport)) { + if (console_suspend_enabled && uart_console(uport)) { uart_change_pm(state, 0); uport->ops->set_termios(uport, &termios, NULL); console_start(uport->cons);