]> git.baikalelectronics.ru Git - kernel.git/commit
serial: omap_8250: Fix RTS handling
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 31 Dec 2014 01:28:15 +0000 (20:28 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jan 2015 22:10:46 +0000 (14:10 -0800)
commit3488709351cf0b333028139ca74e235191900a08
tree104bf2aa066b9fd105013f0fa8262722a77ce525
parentf19fbdc958db9ef06871b1ab8685813839b60cb7
serial: omap_8250: Fix RTS handling

The OMAP3 UART ignores MCR[1] (ie., UART_MCR_RTS) when in autoRTS
mode (UPF_HARD_FLOW + CRTSCTS). This makes it impossible for either
the serial core or userspace to manually flow control the sender.

Disable autoRTS mode when RTS is lowered and restore the previous
mode when RTS is raised.

Note that the OMAP3 UART provides no mechanism for switching from
autoRTS mode without corrupting incoming data; to access the
necessary register, the line control settings must be set to 8-e-2
and thus any data received during that time will be interpreted with
those settings. This corruption has been observed in practice.

Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_core.c
drivers/tty/serial/8250/8250_omap.c
include/linux/serial_8250.h
include/linux/serial_core.h