]> git.baikalelectronics.ru Git - kernel.git/commit
serial: sh-sci: Fix (AUTO)RTS in sci_init_pins()
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 28 Mar 2017 09:13:46 +0000 (11:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Mar 2017 13:29:06 +0000 (15:29 +0200)
commit2565f2e3f4152eb4dc767ff91026278482678773
treec40e6e3c6f364688e1b037bec850c9f8ddc67cc3
parente018cdfffe56690ee42759c7a324a3c16fc7136b
serial: sh-sci: Fix (AUTO)RTS in sci_init_pins()

If a UART has dedicated RTS/CTS pins, and hardware control flow is
disabled (or AUTORTS is not yet effective), changing any serial port
configuration deasserts RTS, as .set_termios() calls sci_init_pins().

To fix this, consider the current (AUTO)RTS state when (re)initializing
the pins.  Note that for SCIFA/SCIFB, AUTORTS needs explicit
configuration of the RTS# pin function, while (H)SCIF handles this
automatically.

Fixes: 9605661a1a5b8fce ("serial: sh-sci: Correct pin initialization on (H)SCIF")
Fixes: c2489c314bdfd060 ("serial: sh-sci: Add pin initialization for SCIFA/SCIFB")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c