serial: 8250-fsl: Only do the break workaround if IIR signals RLSI
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Wed, 13 Dec 2023 17:43:12 +0000 (18:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Dec 2023 13:23:32 +0000 (14:23 +0100)
commita5f18286083fe450d6080abc8d4341c630f682dd
tree467152cdef4249c15a95c60a1463e73db6c82ad9
parent6b64f8e360c00f180cffa1806095cdd2abc55b16
serial: 8250-fsl: Only do the break workaround if IIR signals RLSI

It can happen that while a break is received the transmitter gets empty
and IIR signals a Transmitter holding register empty (THRI) event. In
this case it's too early for the break workaround. Still doing it then
results in the THRI event not being rereported which makes the driver
miss that and e.g. for RS485 half-duplex communication it fails to
switch back to RX mode.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20231213174312.2341013-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_fsl.c