diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-05-21 04:04:26 +0200 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-05-21 04:04:26 +0200 |
commit | efe2f29e324fd20e0449bcd6dc6dbe4734c2ba94 (patch) | |
tree | ff8b2d7eddbfee39aebf7a43c6125202b6bda6d7 /drivers/serial/kgdboc.c | |
parent | kgdb: Add the ability to schedule a breakpoint via a tasklet (diff) | |
download | linux-efe2f29e324fd20e0449bcd6dc6dbe4734c2ba94.tar.xz linux-efe2f29e324fd20e0449bcd6dc6dbe4734c2ba94.zip |
kgdboc,kdb: Allow kdb to work on a non open console port
If kdb is open on a serial port that is not actually a console make
sure to call the poll routines to emit and receive characters.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Martin Hicks <mort@sgi.com>
Diffstat (limited to 'drivers/serial/kgdboc.c')
-rw-r--r-- | drivers/serial/kgdboc.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c index ecef6e1a599a..b765ab48dfe7 100644 --- a/drivers/serial/kgdboc.c +++ b/drivers/serial/kgdboc.c @@ -16,6 +16,7 @@ #include <linux/kgdb.h> #include <linux/kdb.h> #include <linux/tty.h> +#include <linux/console.h> #define MAX_CONFIG_LEN 40 @@ -93,12 +94,14 @@ static int configure_kgdboc(void) int tty_line = 0; int err; char *cptr = config; + struct console *cons; err = kgdboc_option_setup(config); if (err || !strlen(config) || isspace(config[0])) goto noconfig; err = -ENODEV; + kgdboc_io_ops.is_console = 0; kgdb_tty_driver = NULL; if (kgdboc_register_kbd(&cptr)) @@ -108,6 +111,17 @@ static int configure_kgdboc(void) if (!p) goto noconfig; + cons = console_drivers; + while (cons) { + int idx; + if (cons->device && cons->device(cons, &idx) == p && + idx == tty_line) { + kgdboc_io_ops.is_console = 1; + break; + } + cons = cons->next; + } + kgdb_tty_driver = p; kgdb_tty_line = tty_line; |