From: Geert Uytterhoeven Date: Fri, 3 Jun 2016 10:00:03 +0000 (+0200) Subject: serial: sh-sci: Always set TIOCM_CTS in .get_mctrl() callback X-Git-Tag: v4.8-rc1~192^2~64 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=71e98e0e2aede08d6e0a0f3d94ea28b591ef4306;p=linux-2.6-block.git serial: sh-sci: Always set TIOCM_CTS in .get_mctrl() callback 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 Reviewed-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index 0130feb069ae..135f836642ab 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)