aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/sn_console.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-08-31 05:12:14 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-08-31 05:12:14 -0400
commitb129a8ccd53f74c43e4c83c8e0031a4990040830 (patch)
tree4c40afd836be87166d6d014380262f1baa19694f /drivers/serial/sn_console.c
parent6b39374a27eb4be7e9d82145ae270ba02ea90dc8 (diff)
parent194d0710e1a7fe92dcf860ddd31fded8c3103b7a (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 'drivers/serial/sn_console.c')
-rw-r--r--drivers/serial/sn_console.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c
index 12d1f14e78ce..313f9df24a2d 100644
--- a/drivers/serial/sn_console.c
+++ b/drivers/serial/sn_console.c
@@ -259,10 +259,9 @@ static unsigned int snp_tx_empty(struct uart_port *port)
259/** 259/**
260 * snp_stop_tx - stop the transmitter - no-op for us 260 * snp_stop_tx - stop the transmitter - no-op for us
261 * @port: Port to operat eon - we ignore - no-op function 261 * @port: Port to operat eon - we ignore - no-op function
262 * @tty_stop: Set to 1 if called via uart_stop
263 * 262 *
264 */ 263 */
265static void snp_stop_tx(struct uart_port *port, unsigned int tty_stop) 264static void snp_stop_tx(struct uart_port *port)
266{ 265{
267} 266}
268 267
@@ -325,10 +324,9 @@ static void snp_stop_rx(struct uart_port *port)
325/** 324/**
326 * snp_start_tx - Start transmitter 325 * snp_start_tx - Start transmitter
327 * @port: Port to operate on 326 * @port: Port to operate on
328 * @tty_stop: Set to 1 if called via uart_start
329 * 327 *
330 */ 328 */
331static void snp_start_tx(struct uart_port *port, unsigned int tty_stop) 329static void snp_start_tx(struct uart_port *port)
332{ 330{
333 if (sal_console_port.sc_ops->sal_wakeup_transmit) 331 if (sal_console_port.sc_ops->sal_wakeup_transmit)
334 sal_console_port.sc_ops->sal_wakeup_transmit(&sal_console_port, 332 sal_console_port.sc_ops->sal_wakeup_transmit(&sal_console_port,
@@ -615,7 +613,7 @@ static void sn_transmit_chars(struct sn_cons_port *port, int raw)
615 uart_write_wakeup(&port->sc_port); 613 uart_write_wakeup(&port->sc_port);
616 614
617 if (uart_circ_empty(xmit)) 615 if (uart_circ_empty(xmit))
618 snp_stop_tx(&port->sc_port, 0); /* no-op for us */ 616 snp_stop_tx(&port->sc_port); /* no-op for us */
619} 617}
620 618
621/** 619/**