From a58ece8ac8266cd0fd43b64b07031714e55571b9 Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Sun, 4 Dec 2011 18:42:19 -0500 Subject: [PATCH] --- yaml --- r: 280703 b: refs/heads/master c: 0690f41fddd285c3473e4af2a42d15bce7ff3e68 h: refs/heads/master i: 280701: 431c4a88291c532ba1ffa21053e1191adad33ad3 280699: d3a82ac11da83d8bf3ea2cfa13c5271a6bf0dbbb 280695: 3b74697ea2bf68c70f5c72136417020498b03480 280687: 04ad7f4cd2a01cd6aa04a21018dfab9cd071eaaf 280671: faa1e5b5231f39667de693de8ff9257b88ff9692 280639: 0a6bd31697c1467fee79c377b3ddabc5369f494b 280575: cd71a68d22357df1cd89122de4b852a9f825e274 v: v3 --- [refs] | 2 +- trunk/drivers/tty/serial/8250.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 5094872f90b1..0b9b49f8410b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 850624c15da4651f4c6b821723419d8777659577 +refs/heads/master: 0690f41fddd285c3473e4af2a42d15bce7ff3e68 diff --git a/trunk/drivers/tty/serial/8250.c b/trunk/drivers/tty/serial/8250.c index c58e9e286bff..5274228fa03c 100644 --- a/trunk/drivers/tty/serial/8250.c +++ b/trunk/drivers/tty/serial/8250.c @@ -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; @@ -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) @@ -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); @@ -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);