summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-06-03 10:00:03 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-25 16:07:51 (GMT)
commit71e98e0e2aede08d6e0a0f3d94ea28b591ef4306 (patch)
tree19937fc7db9dc3404fb900123ae3469fb5d5ceb3 /drivers/tty
parentb0405dc998e425bbb1f64488b6fda781b627056b (diff)
downloadlinux-71e98e0e2aede08d6e0a0f3d94ea28b591ef4306.tar.xz
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 <geert+renesas@glider.be> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 0130feb..135f836 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)