projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SERIAL] Clean up and fix tty transmission start/stoping
[linux-2.6-block.git]
/
drivers
/
serial
/
sunsu.c
diff --git
a/drivers/serial/sunsu.c
b/drivers/serial/sunsu.c
index d57a3553aea359ac7a3123ae62261f2ed9abbb0d..0cc879eb1c02e36fa53dc057eff22d25a5f7c7be 100644
(file)
--- a/
drivers/serial/sunsu.c
+++ b/
drivers/serial/sunsu.c
@@
-255,21
+255,27
@@
static void disable_rsa(struct uart_sunsu_port *up)
}
#endif /* CONFIG_SERIAL_8250_RSA */
}
#endif /* CONFIG_SERIAL_8250_RSA */
-static void sunsu_stop_tx(struct uart_port *port, unsigned int tty_stop)
+static inline void __stop_tx(struct uart_sunsu_port *p)
+{
+ if (p->ier & UART_IER_THRI) {
+ p->ier &= ~UART_IER_THRI;
+ serial_out(p, UART_IER, p->ier);
+ }
+}
+
+static void sunsu_stop_tx(struct uart_port *port)
{
struct uart_sunsu_port *up = (struct uart_sunsu_port *) port;
{
struct uart_sunsu_port *up = (struct uart_sunsu_port *) port;
- if (up->ier & UART_IER_THRI) {
- up->ier &= ~UART_IER_THRI;
- serial_out(up, UART_IER, up->ier);
- }
- if (up->port.type == PORT_16C950 && tty_stop) {
+ __stop_tx(up);
+
+ if (up->port.type == PORT_16C950 && tty_stop /*FIXME*/) {
up->acr |= UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
}
up->acr |= UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
}
-static void sunsu_start_tx(struct uart_port *port
, unsigned int tty_start
)
+static void sunsu_start_tx(struct uart_port *port)
{
struct uart_sunsu_port *up = (struct uart_sunsu_port *) port;
{
struct uart_sunsu_port *up = (struct uart_sunsu_port *) port;
@@
-280,7
+286,7
@@
static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start)
/*
* We only do this from uart_start
*/
/*
* We only do this from uart_start
*/
- if (tty_start && up->port.type == PORT_16C950) {
+ if (tty_start && up->port.type == PORT_16C950
/*FIXME*/
) {
up->acr &= ~UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
up->acr &= ~UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
@@
-413,8
+419,12
@@
static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
up->port.x_char = 0;
return;
}
up->port.x_char = 0;
return;
}
- if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
- sunsu_stop_tx(&up->port, 0);
+ if (uart_tx_stopped(&up->port)) {
+ sunsu_stop_tx(&up->port);
+ return;
+ }
+ if (uart_circ_empty(xmit)) {
+ __stop_tx(up);
return;
}
return;
}
@@
-431,7
+441,7
@@
static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
uart_write_wakeup(&up->port);
if (uart_circ_empty(xmit))
uart_write_wakeup(&up->port);
if (uart_circ_empty(xmit))
-
sunsu_stop_tx(&up->port, 0
);
+
__stop_tx(up
);
}
static _INLINE_ void check_modem_status(struct uart_sunsu_port *up)
}
static _INLINE_ void check_modem_status(struct uart_sunsu_port *up)