kernel-hacking-2024-linux-s.../drivers/tty
Peter Hurley 391f93f2ec serial: core: Rework hw-assisted flow control support
hw-assisted flow control support was added to the serial core
in v3.8 with commits,
dba05832cb ("SERIAL: core: add hardware assisted h/w flow control support")
2cbacafd7a ("SERIAL: core: add hardware assisted s/w flow control support")
9aba8d5b01 ("SERIAL: core: add throttle/unthrottle callbacks for hardware
                assisted flow control")
Since then, additional requirements for serial core support have arisen.
Specifically,
1. Separate tx and rx flow control settings for UARTs which only support
   tx flow control (ie., autoCTS).
2. Disable sw-assisted CTS flow control in autoCTS mode
3. Support for RTS flow control by serial core and userspace in autoRTS mode

Distinguish mode from capability; introduce UPSTAT_AUTORTS, UPSTAT_AUTOCTS
and UPSTAT_AUTOXOFF which, when set by the uart driver, enable serial core
support for hw-assisted rx, hw-assisted tx and hw-assisted in-band/IXOFF
rx flow control, respectively. [Note: hw-assisted in-band/IXON tx flow
control does not require serial core support/intervention and can be
enabled by the uart driver when required.]

These modes must be set/reset in the driver's set_termios() method, based
on termios settings, and thus can be safely queried in any context in which
one of the port lock, port mutex or termios rwsem are held. Set these modes
in the 2 in-tree drivers, omap-serial and 8250_omap, which currently
use UPF_HARD_FLOW/UPF_SOFT_FLOW support.

Retain UPF_HARD_FLOW and UPF_SOFT_FLOW as capabilities; re-define
UPF_HARD_FLOW as both UPF_AUTO_RTS and UPF_AUTO_CTS to allow for distinct
and separate rx and tx flow control capabilities.

Disable sw-assisted CTS flow control when UPSTAT_AUTOCTS is enabled.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-02 10:11:28 -08:00
..
hvc Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
ipwireless
serial serial: core: Rework hw-assisted flow control support 2015-02-02 10:11:28 -08:00
vt vt: provide notifications on selection changes 2015-02-02 10:09:54 -08:00
amiserial.c TTY: fix misspelling of current function in string 2015-01-09 14:38:15 -08:00
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
goldfish.c
isicom.c tty/isicom: fix big-endian compile warning 2015-02-02 10:11:25 -08:00
Kconfig
Makefile
metag_da.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c
n_hdlc.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: Fix signal handling flushes 2015-02-02 10:11:27 -08:00
nozomi.c
pty.c n_tty: Fix signal handling flushes 2015-02-02 10:11:27 -08:00
rocket.c TTY: fix misspelling of current function in string 2015-01-09 14:38:15 -08:00
rocket.h
rocket_int.h
synclink.c
synclink_gt.c
synclinkmp.c
sysrq.c
tty_audit.c
tty_buffer.c pty: Fix buffer flush deadlock 2015-02-02 10:11:27 -08:00
tty_io.c tty: Prevent hw state corruption in exclusive mode reopen 2015-01-09 13:46:02 -08:00
tty_ioctl.c
tty_ldisc.c
tty_ldsem.c
tty_mutex.c tty: Make lock subclasses available for other tty locks 2015-02-02 10:11:27 -08:00
tty_port.c