Erwan Le Ray 9f77d19207 serial: stm32: add FIFO flush when port is closed
Transmission complete error is sent when ISR_TC is not set. If port closure
is requested despite data in TDR / TX FIFO has not been sent (because of
flow control), ISR_TC is not set and error message is sent on port closure
but also when a new port is opened.

Flush the data when port is closed, so the error isn't printed twice upon
next port opening.

Fixes: 64c32eab6603 ("serial: stm32: Add support of TC bit status check")
Signed-off-by: Erwan Le Ray <erwan.leray@foss.st.com>
Link: https://lore.kernel.org/r/20210304162308.8984-12-erwan.leray@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-10 09:34:11 +01:00
..
2021-02-09 11:45:04 +01:00
2021-03-10 09:34:06 +01:00
2021-03-10 09:34:06 +01:00
2020-06-27 16:21:20 +02:00
2021-03-10 09:34:06 +01:00
2021-03-10 09:34:06 +01:00
2021-03-10 09:34:06 +01:00
2021-03-10 09:34:06 +01:00
2021-03-10 09:34:09 +01:00
2020-12-07 10:19:31 +01:00