Skip to content
Commit 4547be78 authored by Stanislav Brabec's avatar Stanislav Brabec Committed by Greg Kroah-Hartman
Browse files

serial-core: resume serial hardware with no_console_suspend



Perform a tricky suspend/resume even with no_console_suspend.

With no_console_suspend, kernel skips serial port suspend/resume and the
serial hardware may remain in undefined state after resume. It actually
happens on devices that don't have BIOS that handle serial
initialization. It makes impossible to use serial console after resume.

Devices affected by this problem include:
Sharp Zaurus devices
Several PXA based ARM embedded boards

The patch does:
- Save the hardware state
- Perform buffer flush in time of its suspend call
- Tell the driver that port is suspended
- But still accept new data
- And keep console hardware in state that allows to send them

It allows to capture late console messages without breaking console
after resume.

This is just a resend of a patch discussed in these threads, as the
patch was not yet applied.

"Possible suspend/resume regression in .32-rc?" (Nov 1-5, 2009, ARM
list, later LKML)

"serial-core: resume serial hardware with no_console_suspend" (Sep
15-Oct 18, 2009, LKML & ARM lists)

Signed-off-by: default avatarStanislav Brabec <sbrabec@suse.cz>
Tested-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
Tested-by: default avatarDaniel Mack <daniel@caiaq.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6d34855d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment