]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
serial: xilinx_uartps: fix rs485 delay_rts_after_send
authorj.turek <jakub.turek@elsta.tech>
Sun, 21 Dec 2025 10:32:21 +0000 (11:32 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:15 +0000 (12:57 +0100)
commit190dc4b74800746146db12ed669b26ac773003eb
treef7adb9ce6fa7ea36ba7b5a17912e25a1dc5d6b4e
parent320578703ebeca2d96f818d547bacc8ea9afac3c
serial: xilinx_uartps: fix rs485 delay_rts_after_send

commit 267ee93c417e685d9f8e079e41c70ba6ee4df5a5 upstream.

RTS line control with delay should be triggered when there is no more
bytes in kfifo and hardware buffer is empty. Without this patch RTS
control is scheduled right after feeding hardware buffer and this is too
early.

RTS line may change state before hardware buffer is empty.

With this patch delayed RTS state change is triggered when function
cdns_uart_handle_tx is called from cdns_uart_isr on
CDNS_UART_IXR_TXEMPTY exactly when hardware completed transmission

Fixes: fccc9d9233f9 ("tty: serial: uartps: Add rs485 support to uartps driver")
Cc: stable <stable@kernel.org>
Link: https://patch.msgid.link/20251221103221.1971125-1-jakub.turek@elsta.tech
Signed-off-by: Jakub Turek <jakub.turek@elsta.tech>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c