diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-08-31 05:12:14 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-08-31 05:12:14 -0400 |
commit | b129a8ccd53f74c43e4c83c8e0031a4990040830 (patch) | |
tree | 4c40afd836be87166d6d014380262f1baa19694f /Documentation/serial | |
parent | 6b39374a27eb4be7e9d82145ae270ba02ea90dc8 (diff) | |
parent | 194d0710e1a7fe92dcf860ddd31fded8c3103b7a (diff) |
[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>
Diffstat (limited to 'Documentation/serial')
-rw-r--r-- | Documentation/serial/driver | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Documentation/serial/driver b/Documentation/serial/driver index ac7eabbf662a..87856d3cfb67 100644 --- a/Documentation/serial/driver +++ b/Documentation/serial/driver | |||
@@ -111,24 +111,17 @@ hardware. | |||
111 | Interrupts: locally disabled. | 111 | Interrupts: locally disabled. |
112 | This call must not sleep | 112 | This call must not sleep |
113 | 113 | ||
114 | stop_tx(port,tty_stop) | 114 | stop_tx(port) |
115 | Stop transmitting characters. This might be due to the CTS | 115 | Stop transmitting characters. This might be due to the CTS |
116 | line becoming inactive or the tty layer indicating we want | 116 | line becoming inactive or the tty layer indicating we want |
117 | to stop transmission. | 117 | to stop transmission due to an XOFF character. |
118 | |||
119 | tty_stop: 1 if this call is due to the TTY layer issuing a | ||
120 | TTY stop to the driver (equiv to rs_stop). | ||
121 | 118 | ||
122 | Locking: port->lock taken. | 119 | Locking: port->lock taken. |
123 | Interrupts: locally disabled. | 120 | Interrupts: locally disabled. |
124 | This call must not sleep | 121 | This call must not sleep |
125 | 122 | ||
126 | start_tx(port,tty_start) | 123 | start_tx(port) |
127 | start transmitting characters. (incidentally, nonempty will | 124 | start transmitting characters. |
128 | always be nonzero, and shouldn't be used - it will be dropped). | ||
129 | |||
130 | tty_start: 1 if this call was due to the TTY layer issuing | ||
131 | a TTY start to the driver (equiv to rs_start) | ||
132 | 125 | ||
133 | Locking: port->lock taken. | 126 | Locking: port->lock taken. |
134 | Interrupts: locally disabled. | 127 | Interrupts: locally disabled. |