]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sirf: fix system hung on console log output
authorQipan Li <Qipan.Li@csr.com>
Tue, 26 May 2015 09:35:58 +0000 (09:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 21:51:37 +0000 (06:51 +0900)
commitf0d129ab42a47d1ad296f2dd9a4ea380c1078dd3
treeec04b40bc8df095fb0009be9ce98e7a8ea6ecfb3
parent6b6761515cecbce91a62ab6c8705e4f088a8e327
serial: sirf: fix system hung on console log output

A corner case exists in the current driver. if an app opens the console
device, and before writing to console device, and there are huge kernel
ogs to print out, system will hang on
sirfsoc_uart_console_putchar:
while (rd_regl(port, ureg->sirfsoc_tx_fifo_status) &
ufifo_st->ff_full(port->line))
cpu_relax();
as in sirfsoc_uart_startup(), the driver assigns tx_fifo_op to 0 will stop
TX FIFO, this loop will be endless.

Signed-off-by: Qipan Li <Qipan.Li@csr.com>
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sirfsoc_uart.c