lkml.org 
[lkml]   [2008]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/7] kgdboc, 8250: Add the rx polling hook to 8250 driver
Date
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@windriver.com>
---
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


\
 
 \ /
  Last update: 2008-10-21 21:19    [W:1.980 / U:2.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site