[PATCH 4/7] kgdboc, 8250: Add the rx polling hook to 8250 driver

From: Jason Wessel
Date: Tue Oct 21 2008 - 15:16:24 EST


The RX polling hook allows the debugger to hook character input so as
to allow entry to the kernel debugger with a control-c as an example.

Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
---
drivers/serial/8250.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index 303272a..4f7343e 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1361,6 +1361,10 @@ receive_chars(struct uart_8250_port *up, unsigned int *status)
else if (lsr & UART_LSR_FE)
flag = TTY_FRAME;
}
+#ifdef CONFIG_CONSOLE_POLL
+ if (up->port.poll_rx_cb && up->port.poll_rx_cb(ch))
+ goto ignore_char;
+#endif
if (uart_handle_sysrq_char(&up->port, ch))
goto ignore_char;

--
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/