diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-05-21 04:04:22 +0200 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-05-21 04:04:22 +0200 |
commit | f5316b4aea024da9266d740322a5481657f6ce59 (patch) | |
tree | 5888fd0afa54fc3bab2711e583147c4b563836bc /drivers/serial/8250.c | |
parent | kgdb: core changes to support kdb (diff) | |
download | linux-f5316b4aea024da9266d740322a5481657f6ce59.tar.xz linux-f5316b4aea024da9266d740322a5481657f6ce59.zip |
kgdb,8250,pl011: Return immediately from console poll
The design of the kdb shell requires that every device that can
provide input to kdb have a polling routine that exits immediately if
there is no character available. This is required in order to get the
page scrolling mechanism working.
Changing the kernel debugger I/O API to require all polling character
routines to exit immediately if there is no data allows the kernel
debugger to process multiple input channels.
NO_POLL_CHAR will be the return code to the polling routine when ever
there is no character available.
CC: linux-serial@vger.kernel.org
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'drivers/serial/8250.c')
-rw-r--r-- | drivers/serial/8250.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 2b1ea3d4c4f4..891e1dd65f24 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -1891,8 +1891,8 @@ static int serial8250_get_poll_char(struct uart_port *port) struct uart_8250_port *up = (struct uart_8250_port *)port; unsigned char lsr = serial_inp(up, UART_LSR); - while (!(lsr & UART_LSR_DR)) - lsr = serial_inp(up, UART_LSR); + if (!(lsr & UART_LSR_DR)) + return NO_POLL_CHAR; return serial_inp(up, UART_RX); } |