kernel-ark/drivers/tty
Rafael J. Wysocki 048be431e4 sh-sci / PM: Avoid deadlocking runtime PM
The runtime PM of sh-sci devices is enabled when sci_probe() returns,
so the pm_runtime_put_sync() executed by driver_probe_device()
attempts to suspend the device.  Then, in some situations, a
diagnostic message is printed to the console by one of the runtime
suspend routines handling the sh-sci device, which causes synchronous
runtime resume to be started from the device's own runtime suspend
callback.  This causes rpm_resume() to be run eventually, which sees
the RPM_SUSPENDING status set by rpm_suspend() and waits for it to
change.  However, the device's runtime PM status cannot change at
that point, because the routine that has set it waits for the
rpm_suspend() to return.  A deadlock occurs as a result.

To avoid that make sci_init_single() increment the device's
runtime PM usage counter, so that it cannot be suspended by
driver_probe_device().  That counter has to be decremented
eventually, so make sci_startup() do that before starting to
actually use the device and make sci_shutdown() increment it
again before returning to balance the incrementation carried out by
sci_startup().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2012-03-09 12:59:44 +09:00
..
hvc
ipwireless
serial sh-sci / PM: Avoid deadlocking runtime PM 2012-03-09 12:59:44 +09:00
vt drivers/tty/vt/vt_ioctl.c: fix KDFONTOP 32bit compatibility layer 2012-02-02 16:11:23 -08:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
isicom.c
Kconfig tty/powerpc: early udbg consoles can't be modules 2012-02-24 16:11:50 -08:00
Makefile
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c
nozomi.c
pty.c
rocket_int.h
rocket.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
rocket.h
synclink_gt.c
synclink.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
synclinkmp.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
sysrq.c
tty_audit.c
tty_buffer.c
tty_io.c
tty_ioctl.c
tty_ldisc.c
tty_mutex.c
tty_port.c TTY: fix UV serial console regression 2012-01-24 12:55:37 -08:00