summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpuneet saxena <puneets@nvidia.com>2011-02-15 16:57:28 +0530
committerVarun Colbert <vcolbert@nvidia.com>2011-02-22 18:09:27 -0800
commit6737c844504a237536fd14327f416069ca2ec7f2 (patch)
treeb0a73f848bd88fc66ba2b0554f2d3b60e2b54d29
parente74baeb904c579cc8fff2d7fa12cd4a6d83a2708 (diff)
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. Refer http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.37.y.git; a=commit;h=ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1 for cherry-pick the changes from the kernel 2.6.37, commit id as ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1 Bug 758845 Change-Id: Ib83494b2b13cd7179d3ae173be328c8cd776d431 Signed-off-by: puneet saxena <puneets@nvidia.com> Reviewed-on: http://git-master/r/19590 Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com> Tested-by: Bharat Nihalani <bnihalani@nvidia.com> Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
-rw-r--r--drivers/serial/serial_core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 076cfd1546d4..dbbd4347a8a6 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -1987,10 +1987,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
struct tty_struct *tty;
mutex_lock(&port->mutex);
-
/* Must be inside the mutex lock until we convert to tty_port */
tty = port->tty;
-
tty_dev = device_find_child(uport->dev, &match, serial_match_port);
if (device_may_wakeup(tty_dev)) {
enable_irq_wake(uport->irq);
@@ -2068,7 +2066,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);