]> git.ipfire.org Git - thirdparty/linux.git/commit
serial: amba-pl011: fix indefinite RS485 post-send delay
authorFan Wu <fanwu01@zju.edu.cn>
Fri, 31 Jul 2026 08:59:13 +0000 (08:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Aug 2026 14:31:15 +0000 (16:31 +0200)
commitdcb2f7576ce460eb4f6b9048b7c266c8da5848a8
tree37a213f14ab75076cca17fbff88b7fa0b98b6dee
parenta7ad0034453ba4c353f9b8f810ee2569de33d283
serial: amba-pl011: fix indefinite RS485 post-send delay

The RS485 stop hrtimer is used both to drain the transmitter and to wait
out delay_rts_after_send. The callback cannot tell the two apart, so it
restarts the post-send delay on every expiry and the timer never stops.

Add a WAIT_AFTER_SEND_DELAY state so its expiry ends the stop sequence
instead of restarting the delay.

Fixes: 2c1fd53af21b ("serial: amba-pl011: Fix RTS handling in RS485 mode")
Cc: stable <stable@kernel.org>
Assisted-by: Codex:gpt-5.6
Signed-off-by: Fan Wu <fanwu01@zju.edu.cn>
Link: https://patch.msgid.link/20260731085915.326775-2-fanwu01@zju.edu.cn
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/amba-pl011.c