]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
serial: omap: Fix EFR write on RTS deassertion
authorLukas Wunner <lukas@wunner.de>
Sat, 21 Oct 2017 08:50:18 +0000 (10:50 +0200)
committerSasha Levin <alexander.levin@verizon.com>
Thu, 7 Dec 2017 02:20:15 +0000 (21:20 -0500)
[ Upstream commit 2a71de2f7366fb1aec632116d0549ec56d6a3940 ]

Commit 348f9bb31c56 ("serial: omap: Fix RTS handling") sought to enable
auto RTS upon manual RTS assertion and disable it on deassertion.
However it seems the latter was done incorrectly, it clears all bits in
the Extended Features Register *except* auto RTS.

Fixes: 348f9bb31c56 ("serial: omap: Fix RTS handling")
Cc: Peter Hurley <peter@hurleysoftware.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/tty/serial/omap-serial.c

index 6b07b1040dbbb54b96d68b89e630319db7866cea..b8e618ab22736d9392548a0e2870aff835530850 100644 (file)
@@ -708,7 +708,7 @@ static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl)
        if ((mctrl & TIOCM_RTS) && (port->status & UPSTAT_AUTORTS))
                up->efr |= UART_EFR_RTS;
        else
-               up->efr &= UART_EFR_RTS;
+               up->efr &= ~UART_EFR_RTS;
        serial_out(up, UART_EFR, up->efr);
        serial_out(up, UART_LCR, lcr);