]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
serial: sh-sci: Fix late enablement of AUTORTS
authorGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 28 Mar 2017 09:13:45 +0000 (11:13 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Sun, 25 Jun 2017 15:36:35 +0000 (10:36 -0500)
commit4f1b2b475d3c2b69984b86e4221be06f11ec2c4e
tree7953f7721aa6f256a5ce357202181b855eb983f2
parentb7314383a32ab8bd91b2a8cd5ea2d4faf4322eaf
serial: sh-sci: Fix late enablement of AUTORTS

BugLink: http://bugs.launchpad.net/bugs/1700372
commit 5f76895e4c712b1b5af450cf344389b8c53ac2c2 upstream.

When changing hardware control flow for a UART with dedicated RTS/CTS
pins, the new AUTORTS state is not immediately reflected in the
hardware, but only when RTS is raised.  However, the serial core does
not call .set_mctrl() after .set_termios(), hence AUTORTS may only
become effective when the port is closed, and reopened later.
Note that this problem does not happen when manually using stty to
change CRTSCTS, as AUTORTS will work fine on next open.

To fix this, call .set_mctrl() from .set_termios() when dedicated
RTS/CTS pins are present, to refresh the AUTORTS or RTS state.
This is similar to what other drivers supporting AUTORTS do (e.g.
omap-serial).

Reported-by: Baumann, Christoph (C.) <cbaumann@visteon.com>
Fixes: 33f50ffc253854cf ("serial: sh-sci: Fix support for hardware-assisted RTS/CTS")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/tty/serial/sh-sci.c