Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105431
b: refs/heads/master
c: 7500b1f
h: refs/heads/master
i:
  105429: d25b523
  105427: 6b3e56c
  105423: 0e3e7b4
v: v3
  • Loading branch information
Aristeu Rozanski authored and Linus Torvalds committed Jul 24, 2008
1 parent 62d48b9 commit e664ac2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 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: 920519c1c31ca46ef6caab1a4be102ed0dfb5fbc
refs/heads/master: 7500b1f602aad75901774a67a687ee985d85893f
17 changes: 14 additions & 3 deletions trunk/drivers/serial/8250.c
Original file line number Diff line number Diff line change
Expand Up @@ -1293,7 +1293,18 @@ receive_chars(struct uart_8250_port *up, unsigned int *status)
char flag;

do {
ch = serial_inp(up, UART_RX);
if (likely(lsr & UART_LSR_DR))
ch = serial_inp(up, UART_RX);
else
/*
* Intel 82571 has a Serial Over Lan device that will
* set UART_LSR_BI without setting UART_LSR_DR when
* it receives a break. To avoid reading from the
* receive buffer without UART_LSR_DR bit set, we
* just force the read character to be 0
*/
ch = 0;

flag = TTY_NORMAL;
up->port.icount.rx++;

Expand Down Expand Up @@ -1342,7 +1353,7 @@ receive_chars(struct uart_8250_port *up, unsigned int *status)

ignore_char:
lsr = serial_inp(up, UART_LSR);
} while ((lsr & UART_LSR_DR) && (max_count-- > 0));
} while ((lsr & (UART_LSR_DR | UART_LSR_BI)) && (max_count-- > 0));
spin_unlock(&up->port.lock);
tty_flip_buffer_push(tty);
spin_lock(&up->port.lock);
Expand Down Expand Up @@ -1425,7 +1436,7 @@ serial8250_handle_port(struct uart_8250_port *up)

DEBUG_INTR("status = %x...", status);

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

0 comments on commit e664ac2

Please sign in to comment.