WSL2-Linux-Kernel/drivers/tty/serial
Ning Jiang 94abc56f4d 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 5933a161ab
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>
2011-09-22 16:08:56 -07:00
..
cpm_uart TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
jsm jsm: print byte we are dequeing 2011-08-24 15:29:44 -07:00
8250.c serial: Support the EFR-register of XR1715x uarts. 2011-09-22 15:50:38 -07:00
8250.h tty/serial: Add explicit PORT_TEGRA type 2011-05-19 16:51:01 -07:00
8250_accent.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_acorn.c
8250_boca.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_dw.c tty: add a DesignWare 8250 driver 2011-08-26 11:38:46 -07:00
8250_early.c
8250_exar_st16c554.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_fourport.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_gsc.c
8250_hp300.c
8250_hub6.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_mca.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
8250_pci.c serial: Support the EFR-register of XR1715x uarts. 2011-09-22 15:50:38 -07:00
8250_pnp.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
21285.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
68328serial.c TTY: serial, remove dead code from 68328 2011-09-22 15:47:54 -07:00
68328serial.h TTY: serial, remove dead code from 68328 2011-09-22 15:47:54 -07:00
Kconfig TTY: serial, move 68360 driver to staging 2011-09-22 16:00:20 -07:00
Makefile TTY: serial, move 68360 driver to staging 2011-09-22 16:00:20 -07:00
altera_jtaguart.c
altera_uart.c serial: altera_uart: Scan for a free port if platform device id is -1 2011-04-19 16:31:19 -07:00
amba-pl010.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
amba-pl011.c amba pl011: workaround for uart registers lockup 2011-07-08 15:09:23 -07:00
apbuart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
apbuart.h
atmel_serial.c atmel_serial: RS485: receiving enabled when sending data 2011-08-24 15:27:59 -07:00
bcm63xx_uart.c serial: bcm63xx_uart: fix irq storm after rx fifo overrun. 2011-06-16 12:01:58 -07:00
bfin_sport_uart.c treewide: cleanup continuations and remove logging message whitespace 2011-04-26 10:24:37 +02:00
bfin_sport_uart.h
bfin_uart.c serial:bfin_uart: Put TX IRQ in individual platform resource. 2011-08-23 10:48:31 -07:00
clps711x.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
crisv10.c cris: lower the printk level in cris serial driver 2011-09-22 15:51:30 -07:00
crisv10.h
dz.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
dz.h
icom.c Fix common misspellings 2011-03-31 11:26:23 -03:00
icom.h
ifx6x60.c net: remove mm.h inclusion from netdevice.h 2011-06-21 19:17:20 -07:00
ifx6x60.h
imx.c serial/imx: support to handle break character 2011-08-24 15:27:59 -07:00
ioc3_serial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ioc4_serial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ip22zilog.c Fix common misspellings 2011-03-31 11:26:23 -03:00
ip22zilog.h
kgdboc.c kgdboc,kgdbts: strlen() doesn't count the terminator 2011-03-25 16:37:30 -05:00
lantiq.c SERIAL: Lantiq: Add driver for MIPS Lantiq SOCs. 2011-05-19 09:55:43 +01:00
m32r_sio.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
m32r_sio.h
m32r_sio_reg.h
max3100.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
max3107-aava.c
max3107.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
max3107.h Fix common misspellings 2011-03-31 11:26:23 -03:00
mcf.c
mfd.c serial: mfd: Initconst section fixes 2011-09-22 16:05:09 -07:00
mpc52xx_uart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
mpsc.c
mrst_max3110.c max3110: Fix up port->tty backreferencing 2011-08-26 11:01:15 -07:00
mrst_max3110.h max3110: add sysrq support 2011-08-26 11:01:15 -07:00
msm_serial.c TTY: msm_serial, remove unneeded console set 2011-08-23 10:34:05 -07:00
msm_serial.h tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
msm_serial_hs.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
msm_smd_tty.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
mux.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
mxs-auart.c
netx-serial.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
nwpserial.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
of_serial.c Revert "tty: of_serial: add support for the DesignWare 8250" 2011-08-24 15:24:54 -07:00
omap-serial.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
pch_uart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
pmac_zilog.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
pmac_zilog.h
pnx8xxx_uart.c
pxa.c serial: pxa: work around for errata #20 2011-09-22 15:47:53 -07:00
s3c2410.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s3c2412.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s3c2440.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s3c6400.c serial: Remove redundant console_initcall from s3c and s5p console drivers 2011-07-20 19:10:43 +09:00
s5pv210.c Merge branch 'tty-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6 2011-07-25 23:09:27 -07:00
sa1100.c tty: remove invalid location line in file header 2011-04-19 16:33:36 -07:00
samsung.c serial: samsung: Add unified interrupt handler for s3c64xx and later SoC's 2011-08-23 10:48:31 -07:00
samsung.h serial: samsung: Add unified interrupt handler for s3c64xx and later SoC's 2011-08-23 10:48:31 -07:00
sb1250-duart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
sc26xx.c
serial_core.c serial-core: power up uart port early before we do set_termios when resuming 2011-09-22 16:08:56 -07:00
serial_cs.c pcmcia: Convert pcmcia_device_id declarations to const 2011-05-06 07:46:22 +02:00
serial_ks8695.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
serial_txx9.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
sh-sci.c sh: Fix boot crash related to SCI 2011-08-07 15:51:45 -07:00
sh-sci.h serial: sh-sci: FIFO sizing helper consolidation. 2011-06-14 17:38:19 +09:00
sn_console.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
suncore.c
suncore.h
sunhv.c
sunsab.c
sunsab.h
sunsu.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
sunzilog.c Fix common misspellings 2011-03-31 11:26:23 -03:00
sunzilog.h
timbuart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
timbuart.h
uartlite.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
ucc_uart.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
vr41xx_siu.c
vt8500_serial.c treewide: Convert uses of struct resource to resource_size(ptr) 2011-06-10 14:55:36 +02:00
xilinx_uartps.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
zs.c TTY: serial, fix includes in some drivers 2011-09-22 15:49:26 -07:00
zs.h