Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1391118
| From | Geert Uytterhoeven <geert+renesas@glider.be> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 03/11] serial: sh-sci: Always set TIOCM_CTS in .get_mctrl() callback |
| Date | 2016-04-29 15:10 +0200 |
| Message-ID | <rtgle-6wl-55@gated-at.bofh.it> (permalink) |
| References | <rtgbx-69i-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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(-)
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)
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/11] serial: sh-sci: Hardware Flow Control Updates Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:00 +0200
[PATCH v2 02/11] serial: sh-sci: Update DT binding documentation for dedicated RTS/CTS Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
Re: [PATCH v2 02/11] serial: sh-sci: Update DT binding documentation for dedicated RTS/CTS Rob Herring <robh@kernel.org> - 2016-05-03 20:10 +0200
[PATCH v2 08/11] serial: sh-sci: Correct pin initialization on (H)SCIF Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
Re: [PATCH v2 08/11] serial: sh-sci: Correct pin initialization on (H)SCIF Peter Hurley <peter@hurleysoftware.com> - 2016-04-29 18:00 +0200
Re: [PATCH v2 08/11] serial: sh-sci: Correct pin initialization on (H)SCIF Geert Uytterhoeven <geert@linux-m68k.org> - 2016-04-29 22:10 +0200
[PATCH v2 11/11] serial: sh-sci: Add DT support for dedicated RTS/CTS Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
[PATCH v2 01/11] serial: sh-sci: Update DT binding documentation for GPIO modem lines Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
[PATCH v2 05/11] serial: sh-sci: Do not open-code sci_getreg() Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
Re: [PATCH v2 05/11] serial: sh-sci: Do not open-code sci_getreg() Peter Hurley <peter@hurleysoftware.com> - 2016-04-29 17:40 +0200
[PATCH v2 04/11] serial: sh-sci: Add support for GPIO-controlled modem lines Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
[PATCH v2 06/11] serial: sh-sci: Add more Serial Port Register documentation Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
[PATCH v2 03/11] serial: sh-sci: Always set TIOCM_CTS in .get_mctrl() callback Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
Re: [PATCH v2 03/11] serial: sh-sci: Always set TIOCM_CTS in .get_mctrl() callback Peter Hurley <peter@hurleysoftware.com> - 2016-04-29 17:40 +0200
[PATCH v2 09/11] serial: sh-sci: Add pin initialization for SCIFA/SCIFB Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
[PATCH v2 07/11] serial: sh-sci: Add more Serial Port Control/Data Register documentation Geert Uytterhoeven <geert+renesas@glider.be> - 2016-04-29 15:10 +0200
csiph-web