diff options
Diffstat (limited to 'drivers/serial/sunsu.c')
-rw-r--r-- | drivers/serial/sunsu.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index d57a3553aea3..0cc879eb1c02 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -255,21 +255,27 @@ static void disable_rsa(struct uart_sunsu_port *up) | |||
255 | } | 255 | } |
256 | #endif /* CONFIG_SERIAL_8250_RSA */ | 256 | #endif /* CONFIG_SERIAL_8250_RSA */ |
257 | 257 | ||
258 | static void sunsu_stop_tx(struct uart_port *port, unsigned int tty_stop) | 258 | static inline void __stop_tx(struct uart_sunsu_port *p) |
259 | { | ||
260 | if (p->ier & UART_IER_THRI) { | ||
261 | p->ier &= ~UART_IER_THRI; | ||
262 | serial_out(p, UART_IER, p->ier); | ||
263 | } | ||
264 | } | ||
265 | |||
266 | static void sunsu_stop_tx(struct uart_port *port) | ||
259 | { | 267 | { |
260 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; | 268 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; |
261 | 269 | ||
262 | if (up->ier & UART_IER_THRI) { | 270 | __stop_tx(up); |
263 | up->ier &= ~UART_IER_THRI; | 271 | |
264 | serial_out(up, UART_IER, up->ier); | 272 | if (up->port.type == PORT_16C950 && tty_stop /*FIXME*/) { |
265 | } | ||
266 | if (up->port.type == PORT_16C950 && tty_stop) { | ||
267 | up->acr |= UART_ACR_TXDIS; | 273 | up->acr |= UART_ACR_TXDIS; |
268 | serial_icr_write(up, UART_ACR, up->acr); | 274 | serial_icr_write(up, UART_ACR, up->acr); |
269 | } | 275 | } |
270 | } | 276 | } |
271 | 277 | ||
272 | static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start) | 278 | static void sunsu_start_tx(struct uart_port *port) |
273 | { | 279 | { |
274 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; | 280 | struct uart_sunsu_port *up = (struct uart_sunsu_port *) port; |
275 | 281 | ||
@@ -280,7 +286,7 @@ static void sunsu_start_tx(struct uart_port *port, unsigned int tty_start) | |||
280 | /* | 286 | /* |
281 | * We only do this from uart_start | 287 | * We only do this from uart_start |
282 | */ | 288 | */ |
283 | if (tty_start && up->port.type == PORT_16C950) { | 289 | if (tty_start && up->port.type == PORT_16C950 /*FIXME*/) { |
284 | up->acr &= ~UART_ACR_TXDIS; | 290 | up->acr &= ~UART_ACR_TXDIS; |
285 | serial_icr_write(up, UART_ACR, up->acr); | 291 | serial_icr_write(up, UART_ACR, up->acr); |
286 | } | 292 | } |
@@ -413,8 +419,12 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up) | |||
413 | up->port.x_char = 0; | 419 | up->port.x_char = 0; |
414 | return; | 420 | return; |
415 | } | 421 | } |
416 | if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) { | 422 | if (uart_tx_stopped(&up->port)) { |
417 | sunsu_stop_tx(&up->port, 0); | 423 | sunsu_stop_tx(&up->port); |
424 | return; | ||
425 | } | ||
426 | if (uart_circ_empty(xmit)) { | ||
427 | __stop_tx(up); | ||
418 | return; | 428 | return; |
419 | } | 429 | } |
420 | 430 | ||
@@ -431,7 +441,7 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up) | |||
431 | uart_write_wakeup(&up->port); | 441 | uart_write_wakeup(&up->port); |
432 | 442 | ||
433 | if (uart_circ_empty(xmit)) | 443 | if (uart_circ_empty(xmit)) |
434 | sunsu_stop_tx(&up->port, 0); | 444 | __stop_tx(up); |
435 | } | 445 | } |
436 | 446 | ||
437 | static _INLINE_ void check_modem_status(struct uart_sunsu_port *up) | 447 | static _INLINE_ void check_modem_status(struct uart_sunsu_port *up) |