This is a note to let you know that I've just added the patch titled serial: amba-pl011: fix high priority character transmission in rs486 mode to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: serial-amba-pl011-fix-high-priority-character-transmission-in-rs486-mode.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 4f39aca2360c82dccd2f5179d77e94aab665bea6 Mon Sep 17 00:00:00 2001 From: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx> Date: Sun, 8 Jan 2023 19:17:35 +0100 Subject: serial: amba-pl011: fix high priority character transmission in rs486 mode From: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx Signed-off-by: Lino Sanfilippo <l.sanfilippo@xxxxxxxxxx> Link: https://lore.kernel.org/r/20230108181735.10937-1-LinoSanfilippo@xxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/tty/serial/amba-pl011.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1472,6 +1472,10 @@ static bool pl011_tx_chars(struct uart_a struct circ_buf *xmit = &uap->port.state->xmit; int count = uap->fifosize >> 1; + if ((uap->port.rs485.flags & SER_RS485_ENABLED) && + !uap->rs485_tx_started) + pl011_rs485_tx_start(uap); + if (uap->port.x_char) { if (!pl011_tx_char(uap, uap->port.x_char, from_irq)) return true; @@ -1483,10 +1487,6 @@ static bool pl011_tx_chars(struct uart_a return false; } - if ((uap->port.rs485.flags & SER_RS485_ENABLED) && - !uap->rs485_tx_started) - pl011_rs485_tx_start(uap); - /* If we are using DMA mode, try to send some characters. */ if (pl011_dma_tx_irq(uap)) return true; Patches currently in stable-queue which might be from l.sanfilippo@xxxxxxxxxx are queue-5.15/serial-amba-pl011-fix-high-priority-character-transmission-in-rs486-mode.patch