serial: amba-pl011: fix high priority character transmission in rs486 mode
authorLino Sanfilippo <l.sanfilippo@kunbus.com>
Sun, 8 Jan 2023 18:17:35 +0000 (19:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jan 2023 06:24:39 +0000 (07:24 +0100)
commitab47d385da12bf715e686c431e687ec691b9c727
tree83120f610135eb8df8ad1e63cb8f0be32543cb10
parente7c07deaa1937a3c38d631b9f8d1c37b9f70dc42
serial: amba-pl011: fix high priority character transmission in rs486 mode

commit 4f39aca2360c82dccd2f5179d77e94aab665bea6 upstream.

In RS485 mode the transmission of a high priority character fails since it
is written to the data register before the transmitter is enabled. Fix this
in pl011_tx_chars() by enabling RS485 transmission before writing the
character.

Fixes: 8d479237727c ("serial: amba-pl011: add RS485 support")
Cc: stable@vger.kernel.org
Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
Link: https://lore.kernel.org/r/20230108181735.10937-1-LinoSanfilippo@gmx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c