serial/imx: read cts state only after acking cts change irq
commit1eb710f4e01a9afab735828c87ef13e2e6b57386
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 11 Apr 2011 08:59:09 +0000 (11 10:59 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 May 2011 16:19:38 +0000 (2 09:19 -0700)
treef9b0e5fbf7b0ec7835384cb5972ce894623da087
parent7b394b6f584438e9048825dd4571299945ce9b54
serial/imx: read cts state only after acking cts change irq

commit 5680e94148a86e8c31fdc5cb0ea0d5c6810c05b0 upstream.

If cts changes between reading the level at the cts input (USR1_RTSS)
and acking the irq (USR1_RTSD) the last edge doesn't generate an irq and
uart_handle_cts_change is called with a outdated value for cts.

The race was introduced by commit

ceca629 ([ARM] 2971/1: i.MX uart handle rts irq)

Reported-by: Arwed Springer <Arwed.Springer@de.trumpf.com>
Tested-by: Arwed Springer <Arwed.Springer@de.trumpf.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/imx.c