]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
serial: qcom-geni: Fix RTS behavior with flow control
authorAnup Kulkarni <anup.kulkarni@oss.qualcomm.com>
Tue, 10 Mar 2026 10:41:55 +0000 (16:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Mar 2026 14:25:44 +0000 (15:25 +0100)
commit0b1837c04d2335ec50b9a55b0282dcde7bc12439
tree5988cec0d485bf0f303b397a73997c6602447e82
parent74e0c9f0528bcd597cb1299a027d7be27d1c27d9
serial: qcom-geni: Fix RTS behavior with flow control

When userspace enables flow control (CRTSCTS), the driver
deasserts RTS even when the receive buffer has space. This prevents the
peer device from transmitting, causing communication to stall.

The root cause is that the driver unconditionally uses manual RTS control
regardless of flow control mode. When CRTSCTS is set, the hardware should
automatically manage RTS based on buffer status, but the driver overrides
this by setting manual control.

Fix this by introducing port->manual_flow flag. In set_termios(), disable
manual flow when CRTSCTS is set. In set_mctrl(), only assert
SE_UART_MANUAL_RFR when manual_flow is active. Verified by enabling and
disabling hardware flow control with stty.

Signed-off-by: Anup Kulkarni <anup.kulkarni@oss.qualcomm.com>
Link: https://patch.msgid.link/20260310104155.339010-1-anup.kulkarni@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/qcom_geni_serial.c