]> git.baikalelectronics.ru Git - kernel.git/commit
serial: imx: protect Soft Reset of port with lock
authorJiada Wang <jiada_wang@mentor.com>
Mon, 13 Apr 2015 09:31:43 +0000 (18:31 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 6 May 2015 20:26:56 +0000 (22:26 +0200)
commit5b3fc3f74a428259ded6d0b228baee43921b4de6
tree206a263e8822297563deed33fa956cdbe084f6f6
parent32442cb91ff3acd02f7af4e2ea14d5d2635d9b4d
serial: imx: protect Soft Reset of port with lock

Previously Soft Reset (clear of SRST bit in UCR2 register)
of UART in startup is not protected by lock, which may have race
with console_write, as console_write may occur at anytime even
when UART port is shutdown.

To avoid this race, protect Soft reset of UART port with spin_lock.

Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c