Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280703
b: refs/heads/master
c: 0690f41
h: refs/heads/master
i:
  280701: 431c4a8
  280699: d3a82ac
  280695: 3b74697
  280687: 04ad7f4
  280671: faa1e5b
  280639: 0a6bd31
  280575: cd71a68
v: v3
  • Loading branch information
Paul Gortmaker authored and Greg Kroah-Hartman committed Dec 10, 2011
1 parent 5003790 commit a58ece8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 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: 850624c15da4651f4c6b821723419d8777659577
refs/heads/master: 0690f41fddd285c3473e4af2a42d15bce7ff3e68
17 changes: 11 additions & 6 deletions trunk/drivers/tty/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -1375,11 +1375,16 @@ static void clear_rx_fifo(struct uart_8250_port *up)
} while (1);
}

static void
receive_chars(struct uart_8250_port *up, unsigned int *status)
/*
* receive_chars: processes according to the passed in LSR
* value, and returns the remaining LSR bits not handled
* by this Rx routine.
*/
static unsigned char
receive_chars(struct uart_8250_port *up, unsigned char lsr)
{
struct tty_struct *tty = up->port.state->port.tty;
unsigned char ch, lsr = *status;
unsigned char ch;
int max_count = 256;
char flag;

Expand Down Expand Up @@ -1455,7 +1460,7 @@ receive_chars(struct uart_8250_port *up, unsigned int *status)
spin_unlock(&up->port.lock);
tty_flip_buffer_push(tty);
spin_lock(&up->port.lock);
*status = lsr;
return lsr;
}

static void transmit_chars(struct uart_8250_port *up)
Expand Down Expand Up @@ -1524,7 +1529,7 @@ static unsigned int check_modem_status(struct uart_8250_port *up)
*/
static void serial8250_handle_port(struct uart_8250_port *up)
{
unsigned int status;
unsigned char status;
unsigned long flags;

spin_lock_irqsave(&up->port.lock, flags);
Expand All @@ -1534,7 +1539,7 @@ static void serial8250_handle_port(struct uart_8250_port *up)
DEBUG_INTR("status = %x...", status);

if (status & (UART_LSR_DR | UART_LSR_BI))
receive_chars(up, &status);
status = receive_chars(up, status);
check_modem_status(up);
if (status & UART_LSR_THRE)
transmit_chars(up);
Expand Down

0 comments on commit a58ece8

Please sign in to comment.