diff options
author | Vijay Kumar <vijay.ac.kumar@oracle.com> | 2017-02-01 11:34:39 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-23 08:27:24 -0800 |
commit | 7db60d05e5ccc0a473fa2275f90f2fca0002ab21 (patch) | |
tree | 6f10565200e8a57c461b416ea6a121f4d76a868b /drivers/tty | |
parent | 7dd4fcf5b70694dc961eb6b954673e4fc9730dbd (diff) |
sparc64: Send break twice from console to return to boot prom
Now we can also jump to boot prom from sunhv console by sending
break twice on console for both running and panicked kernel
cases.
Signed-off-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/sunhv.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/tty/serial/sunhv.c b/drivers/tty/serial/sunhv.c index c5ebdc8bed6a..46e46894e918 100644 --- a/drivers/tty/serial/sunhv.c +++ b/drivers/tty/serial/sunhv.c @@ -116,7 +116,7 @@ static int receive_chars_getchar(struct uart_port *port) static int receive_chars_read(struct uart_port *port) { - int saw_console_brk = 0; + static int saw_console_brk; int limit = 10000; while (limit-- > 0) { @@ -128,6 +128,9 @@ static int receive_chars_read(struct uart_port *port) bytes_read = 0; if (stat == CON_BREAK) { + if (saw_console_brk) + sun_do_break(); + if (uart_handle_break(port)) continue; saw_console_brk = 1; @@ -151,6 +154,7 @@ static int receive_chars_read(struct uart_port *port) if (port->sysrq != 0 && *con_read_page) { for (i = 0; i < bytes_read; i++) uart_handle_sysrq_char(port, con_read_page[i]); + saw_console_brk = 0; } if (port->state == NULL) |