Message ID | 1461934714-18681-4-git-send-email-geert+renesas@glider.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 04/29/2016 05:58 AM, Geert Uytterhoeven wrote: > Documentation/serial/driver clearly states: > > If the port does not support CTS, DCD or DSR, the driver should > indicate that the signal is permanently active. > > Hence always set TIOCM_CTS, as we currently don't look at the CTS > hardware line state at all. > > FWIW, this fixes the transmit path when hardware-assisted flow control > is enabled, and userspace enables CRTSCTS. > The receive path is still broken, as RTS is never asserted. Reviewed-by: Peter Hurley <peter@hurleysoftware.com> -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 0130feb069aee02f..135f836642ab1c5a 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1835,9 +1835,9 @@ static unsigned int sci_get_mctrl(struct uart_port *port) { /* * CTS/RTS is handled in hardware when supported, while nothing - * else is wired up. Keep it simple and simply assert DSR/CAR. + * else is wired up. Keep it simple and simply assert CTS/DSR/CAR. */ - return TIOCM_DSR | TIOCM_CAR; + return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; } static void sci_break_ctl(struct uart_port *port, int break_state)
Documentation/serial/driver clearly states: If the port does not support CTS, DCD or DSR, the driver should indicate that the signal is permanently active. Hence always set TIOCM_CTS, as we currently don't look at the CTS hardware line state at all. FWIW, this fixes the transmit path when hardware-assisted flow control is enabled, and userspace enables CRTSCTS. The receive path is still broken, as RTS is never asserted. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- v2: - Drop RFC status. --- drivers/tty/serial/sh-sci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)