public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Adding ctrl-o sysrq hack support to 8250 driver
@ 2005-12-09 14:05 Olaf Hering
  2005-12-09 14:10 ` Russell King
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Olaf Hering @ 2005-12-09 14:05 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, Sachin Sant


If you can queue this up in -mm for a decade or two, just to make sure
it doesnt make some setup unhappy.


a POWER4 system in 'full-system-partition' mode has the console device
on ttyS0. But the user interface to the Linux system console may still
be on the hardware management console (HMC). If this is the case, there
is no way to send a break to trigger a sysrq.
Other setups do already use 'ctrl o' to trigger sysrq. This includes iSeries
virtual console on tty1, and pSeries LPAR console on hvc0 or hvsi0.

'ctrl o' is currently mapped to 'flush output', see 'stty -a'

Signed-off-by: Olaf Hering <olh@suse.de>

 drivers/serial/8250.c |    7 +++++++
 1 files changed, 7 insertions(+)

Index: linux-2.6.15-rc5-olh/drivers/serial/8250.c
===================================================================
--- linux-2.6.15-rc5-olh.orig/drivers/serial/8250.c
+++ linux-2.6.15-rc5-olh/drivers/serial/8250.c
@@ -1154,6 +1154,13 @@ 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, but only on the system console */
+		if (ch == '\x0f' && uart_handle_break(&up->port))
+			goto ignore_char;
+#endif
+
 		flag = TTY_NORMAL;
 		up->port.icount.rx++;
 
-- 
short story of a lazy sysadmin:
 alias appserv=wotan

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2006-01-03 12:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-09 14:05 [PATCH] Adding ctrl-o sysrq hack support to 8250 driver Olaf Hering
2005-12-09 14:10 ` Russell King
2005-12-09 15:13 ` Daniel Jacobowitz
2005-12-09 15:19   ` Olaf Hering
2005-12-09 15:26     ` Daniel Jacobowitz
2005-12-09 15:28       ` Olaf Hering
2005-12-09 15:25 ` Erik Mouw
2005-12-09 15:34   ` Olaf Hering
2005-12-09 20:47     ` Olaf Hering
2005-12-09 17:08   ` Russell King
2005-12-12 10:03     ` Olaf Hering
2006-01-03 12:44       ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox