Searched hist:"5933 a161abcb8d83a2c145177f48027c3c0a8995" (Results 1 – 1 of 1) sorted by relevance
/linux/drivers/tty/serial/ |
H A D | serial_core.c | diff 94abc56f4d90f289ea32a0a11d3577fcd8cb28fb Mon Sep 05 10:28:18 CEST 2011 Ning Jiang <ning.jiang@marvell.com> serial-core: power up uart port early before we do set_termios when resuming
The following patch removed uart_change_pm() in uart_resume_port():
commit 5933a161abcb8d83a2c145177f48027c3c0a8995 Author: Yin Kangkai <kangkai.yin@linux.intel.com> serial-core: reset the console speed on resume
It will break the pxa serial driver when the system resumes from suspend mode as it will try to set baud rate divider register in set_termios but with clock off. The register value can not be set correctly on some platform if the clock is disabled. The pxa driver will check the value and report the following warning:
------------[ cut here ]------------ WARNING: at drivers/tty/serial/pxa.c:545 serial_pxa_set_termios+0x1dc/0x250() Modules linked in: [<c0281f30>] (unwind_backtrace+0x0/0xf0) from [<c029341c>] (warn_slowpath_common+0x4c/0x64) [<c029341c>] (warn_slowpath_common+0x4c/0x64) from [<c029344c>] (warn_slowpath_null+0x18/0x1c) [<c029344c>] (warn_slowpath_null+0x18/0x1c) from [<c044b1e4>] (serial_pxa_set_termios+0x1dc/0x250) [<c044b1e4>] (serial_pxa_set_termios+0x1dc/0x250) from [<c044a840>] (uart_resume_port+0x128/0x2dc) [<c044a840>] (uart_resume_port+0x128/0x2dc) from [<c044bbe0>] (serial_pxa_resume+0x18/0x24) [<c044bbe0>] (serial_pxa_resume+0x18/0x24) from [<c0454d34>] (platform_pm_resume+0x40/0x4c) [<c0454d34>] (platform_pm_resume+0x40/0x4c) from [<c0457ebc>] (pm_op+0x68/0xb4) [<c0457ebc>] (pm_op+0x68/0xb4) from [<c0458368>] (device_resume+0xb0/0xec) [<c0458368>] (device_resume+0xb0/0xec) from [<c04584c8>] (dpm_resume+0xe0/0x194) [<c04584c8>] (dpm_resume+0xe0/0x194) from [<c0458588>] (dpm_resume_end+0xc/0x18) [<c0458588>] (dpm_resume_end+0xc/0x18) from [<c02c518c>] (suspend_devices_and_enter+0x16c/0x1ac) [<c02c518c>] (suspend_devices_and_enter+0x16c/0x1ac) from [<c02c5278>] (enter_state+0xac/0xdc) [<c02c5278>] (enter_state+0xac/0xdc) from [<c02c48ec>] (state_store+0xa0/0xbc) [<c02c48ec>] (state_store+0xa0/0xbc) from [<c0408f7c>] (kobj_attr_store+0x18/0x1c) [<c0408f7c>] (kobj_attr_store+0x18/0x1c) from [<c034a6a4>] (sysfs_write_file+0x108/0x140) [<c034a6a4>] (sysfs_write_file+0x108/0x140) from [<c02fb798>] (vfs_write+0xac/0x134) [<c02fb798>] (vfs_write+0xac/0x134) from [<c02fb8cc>] (sys_write+0x3c/0x68) [<c02fb8cc>] (sys_write+0x3c/0x68) from [<c027c700>] (ret_fast_syscall+0x0/0x2c) ---[ end trace 88289eceb4675b04 ]---
This patch fix the problem by adding the power on opertion back for uart console when console_suspend_enabled is true.
Signed-off-by: Ning Jiang <ning.jiang@marvell.com> Tested-by: Mayank Rana <mrana@codeaurora.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> diff 5933a161abcb8d83a2c145177f48027c3c0a8995 Sun Jan 30 04:15:30 CET 2011 Yin Kangkai <kangkai.yin@linux.intel.com> serial-core: reset the console speed on resume
On some platforms, we need to restore the console speed on resume even it was not suspended (no_console_suspend), and on others we don't have to do that.
So don't care about the "console_suspend_enabled" and unconditionally reset the console speed if it is a console.
This is actually a redo of ba15ab0 (Set proper console speed on resume if console suspend is disabled) from Deepak Saxena. I also tried to investigate more to find out if this change will break others, here is what I've found out:
commit 891b9dd10764352926e1e107756aa229dfa2c210 Author: Jason Wang <jason77.wang@gmail.com> serial-core: restore termios settings when resume console ports
commit ca2e71aa8cfb0056ce720f3fd53f59f5fac4a3e1 Author: Jason Wang <jason77.wang@gmail.com> serial-core: skip call set_termios/console_start when no_console_suspend
commit 4547be7809a3b775ce750ec7f8b5748954741523 Author: Stanislav Brabec <sbrabec@suse.cz> serial-core: resume serial hardware with no_console_suspend
commit ba15ab0e8de0d4439a91342ad52d55ca9e313f3d Author: Deepak Saxena <dsaxena@laptop.org> Set proper console speed on resume if console suspend is disabled
from ba15ab0, we learned that, even if the console suspend is disabled (when no_console_suspend is set), we may still need to "reset the port to the state it was in before we suspended."
Then with 4547be7, this piece of code is removed.
And then Jason Wang added that back in ca2e71a and 891b9dd, to fix some breakage on OMAP3EVM platform. From ca2e71a we learned that the "set_termios" things is actually needed by both console is suspended and not suspended.
That's why I removed the console_suspended_enabled condition, and only call console_start() when we actually suspeneded it.
I also noticed in this thread: http://marc.info/?t=129079257100004&r=1&w=2, which talked about on some platforms, UART HW will be cut power whether or not we set no_console_suspend, and then on resume it does not work quite well. I have a similar HW, and this patch fixed this issue, don't know if this patch also works on their platforms.
[Update: Stanislav tested this patch on Zaurus and reported it improves the situation. Thanks.]
CC: Greg KH <greg@kroah.com> CC: Deepak Saxena <dsaxena@laptop.org> CC: Jason Wang <jason77.wang@gmail.com> CC: Stanislav Brabec <sbrabec@suse.cz> CC: Daniel Drake <dsd@laptop.org> Signed-off-by: Yin Kangkai <kangkai.yin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
|