[SERIAL] Clean up and fix tty transmission start/stoping
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Wed, 31 Aug 2005 09:12:14 +0000 (10:12 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 31 Aug 2005 09:12:14 +0000 (10:12 +0100)
commitb129a8ccd53f74c43e4c83c8e0031a4990040830
tree4c40afd836be87166d6d014380262f1baa19694f
parent6b39374a27eb4be7e9d82145ae270ba02ea90dc8
parent194d0710e1a7fe92dcf860ddd31fded8c3103b7a
[SERIAL] Clean up and fix tty transmission start/stoping

The start_tx and stop_tx methods were passed a flag to indicate
whether the start/stop was from the tty start/stop callbacks, and
some drivers used this flag to decide whether to ask the UART to
immediately stop transmission (where the UART supports such a
feature.)

There are other cases when we wish this to occur - when CTS is
lowered, or if we change from soft to hard flow control and CTS
is inactive.  In these cases, this flag was false, and we would
allow the transmitter to drain before stopping.

There is really only one case where we want to let the transmitter
drain before disabling, and that's when we run out of characters
to send.

Hence, re-jig the start_tx and stop_tx methods to eliminate this
flag, and introduce new functions for the special "disable and
allow transmitter to drain" case.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
34 files changed:
Documentation/serial/driver
drivers/serial/21285.c
drivers/serial/8250.c
drivers/serial/amba-pl010.c
drivers/serial/amba-pl011.c
drivers/serial/au1x00_uart.c
drivers/serial/clps711x.c
drivers/serial/cpm_uart/cpm_uart_core.c
drivers/serial/dz.c
drivers/serial/icom.c
drivers/serial/imx.c
drivers/serial/ioc4_serial.c
drivers/serial/ip22zilog.c
drivers/serial/jsm/jsm_tty.c
drivers/serial/m32r_sio.c
drivers/serial/mpc52xx_uart.c
drivers/serial/mpsc.c
drivers/serial/mux.c
drivers/serial/pmac_zilog.c
drivers/serial/pxa.c
drivers/serial/s3c2410.c
drivers/serial/sa1100.c
drivers/serial/serial_core.c
drivers/serial/serial_lh7a40x.c
drivers/serial/serial_txx9.c
drivers/serial/sh-sci.c
drivers/serial/sn_console.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
drivers/serial/uart00.c
drivers/serial/v850e_uart.c
drivers/serial/vr41xx_siu.c
include/linux/serial_core.h