Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3951
b: refs/heads/master
c: e763b90
h: refs/heads/master
i:
  3949: bd37ee0
  3947: d015875
  3943: f864821
  3935: 756e1e6
v: v3
  • Loading branch information
Russell King authored and Russell King committed Jun 29, 2005
1 parent f502b17 commit 336dc89
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0dd7a1aed7c34a39917c4faf75b4230c169e809b
refs/heads/master: e763b90c41563a0f8258d379fe71a9a1f1fa5445
28 changes: 16 additions & 12 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,21 +993,24 @@ static void autoconfig_irq(struct uart_8250_port *up)
up->port.irq = (irq > 0) ? irq : 0;
}

static inline void __stop_tx(struct uart_8250_port *p)
{
if (p->ier & UART_IER_THRI) {
p->ier &= ~UART_IER_THRI;
serial_out(p, UART_IER, p->ier);
}
}

static void serial8250_stop_tx(struct uart_port *port, unsigned int tty_stop)
{
struct uart_8250_port *up = (struct uart_8250_port *)port;

if (up->ier & UART_IER_THRI) {
up->ier &= ~UART_IER_THRI;
serial_out(up, UART_IER, up->ier);
}
__stop_tx(up);

/*
* We only do this from uart_stop - if we run out of
* characters to send, we don't want to prevent the
* FIFO from emptying.
* We really want to stop the transmitter from sending.
*/
if (up->port.type == PORT_16C950 && tty_stop) {
if (up->port.type == PORT_16C950) {
up->acr |= UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
Expand All @@ -1031,10 +1034,11 @@ static void serial8250_start_tx(struct uart_port *port, unsigned int tty_start)
transmit_chars(up);
}
}

/*
* We only do this from uart_start
* Re-enable the transmitter if we disabled it.
*/
if (tty_start && up->port.type == PORT_16C950) {
if (up->port.type == PORT_16C950 && up->acr & UART_ACR_TXDIS) {
up->acr &= ~UART_ACR_TXDIS;
serial_icr_write(up, UART_ACR, up->acr);
}
Expand Down Expand Up @@ -1155,7 +1159,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
return;
}
if (uart_circ_empty(xmit) || uart_tx_stopped(&up->port)) {
serial8250_stop_tx(&up->port, 0);
__stop_tx(up);
return;
}

Expand All @@ -1174,7 +1178,7 @@ static _INLINE_ void transmit_chars(struct uart_8250_port *up)
DEBUG_INTR("THRE...");

if (uart_circ_empty(xmit))
serial8250_stop_tx(&up->port, 0);
__stop_tx(up);
}

static _INLINE_ void check_modem_status(struct uart_8250_port *up)
Expand Down

0 comments on commit 336dc89

Please sign in to comment.