[RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver
From: Sachin Sant (sachinp_at_in.ibm.com)
Date: 11/30/05
- Previous message: downtune: "Sell your music directly to your fans"
- Next in thread: Arjan van de Ven: "Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver"
- Reply: Arjan van de Ven: "Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver"
- Reply: Russell King: "Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 30 Nov 2005 16:47:14 +0530 To: lkml <linux-kernel@vger.kernel.org>
The following patch will allow a user to use sysrq keys over a serial
console using the ctrl-o key sequence. This is similar to functionality
provided by the hvc console drivers on PPC boxes.
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
diff -Naurp linux-2.6.14.3/drivers/serial/8250.c linux-2.6.14.3-new/drivers/serial/8250.c
--- linux-2.6.14.3/drivers/serial/8250.c 2005-11-11 11:03:12.000000000 +0530
+++ linux-2.6.14.3-new/drivers/serial/8250.c 2005-11-17 15:12:42.000000000 +0530
@@ -1084,6 +1084,23 @@ receive_chars(struct uart_8250_port *up,
*/
}
ch = serial_inp(up, UART_RX);
+
+#if defined(CONFIG_MAGIC_SYSRQ) && defined(CONFIG_SERIAL_CORE_CONSOLE)
+ /* Handle the SysRq ^O Hack */
+ if (ch == '\x0f') {
+ up->port.sysrq = jiffies + HZ*5;
+ goto ignore_char;
+ }
+ if (up->port.sysrq) {
+ int swallow;
+ spin_unlock(&up->port.lock);
+ swallow = uart_handle_sysrq_char(&up->port, ch, regs);
+ spin_lock(&up->port.lock);
+ if (swallow)
+ goto ignore_char;
+ }
+#endif /* CONFIG_MAGIC_SYSRQ && CONFIG_SERIAL_CORE_CONSOLE */
+
flag = TTY_NORMAL;
up->port.icount.rx++;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: downtune: "Sell your music directly to your fans"
- Next in thread: Arjan van de Ven: "Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver"
- Reply: Arjan van de Ven: "Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver"
- Reply: Russell King: "Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: [RFC] [PATCH] Adding ctrl-o sysrq hack support to 8250 driver
... > The following patch will allow a user to use sysrq keys over a serial ...
> console using the ctrl-o key sequence. ... This is similar to functionality
... > provided by the hvc console drivers on PPC boxes. ... (Linux-Kernel) - Re: VIA SATA I/O errors
... > and a lot of SCSI error messages will be output to the console. ... >
few instances of this happening (which requires a hard power-off, ... I have no idea whether
this is a software or hardware ... send the line "unsubscribe linux-kernel" in ...
(Linux-Kernel) - Re: [linux-pm] [RFC] Add some hooks to generic suspend code
... > switch to other console before suspend, so X has to give up ...
I'd rather not break an existing and relied upon userland interface now, ... send the line
"unsubscribe linux-kernel" in ... (Linux-Kernel) - RE: Panics need better handling
... It saves the panic info into a firmware log. ... Subject: Panics need
better handling ... > Using a framebuffer console helps a lot. ... send the line
"unsubscribe linux-kernel" in ... (Linux-Kernel) - [PATCH] fix vgacon blanking
... This patch fixes a long-standing vgacon bug: characters with the bright ...
and then wait for the console to blank itself (by default, ... {int i, j; ...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message
to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please
read the FAQ at http://www.tux.org/lkml/ ... (Linux-Kernel)