From 867922bd007f3cd49d73d4ff8c28cd87dd14b7e6 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Fri, 28 Mar 2014 09:28:11 +0000 Subject: serial: Emulate break using control characters Currently the magic SysRq functions are accessed by sending a break. Unfortunately some networked serial proxies makes is difficult to send a break meaning SysRq functions cannot be reached. We avoid this problem by allowing the (fairly unlikely) sequence of ^B^R^K characters to emulate a real break. This approach is very nearly as robust as normal sysrq/break handling because all trigger recognition happens during interrupt handling however to emulate a break we must enter the ISR four times (instead of twice) and manage an extra byte of state. Signed-off-by: Daniel Thompson --- lib/Kconfig.debug | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/Kconfig.debug') diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 97d62c2da6c2..831a9aeee173 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug @@ -426,6 +426,21 @@ config MAGIC_SYSRQ_SERIAL This option allows you to decide whether you want to enable the magic SysRq key. +config MAGIC_SYSRQ_BREAK_EMULATION + bool "Enable magic SysRq serial break emulation" + depends on MAGIC_SYSRQ_SERIAL && SERIAL_CORE_CONSOLE + default n + help + If you say Y here, then you can use the character sequence ^B^R^K + to simulate a BREAK on the serial console. This is useful if for + some reason you cannot send a BREAK to your console's serial port. + For example, if you have a serial device server that cannot + send a BREAK. Enabling this feature can delay the delivery of + characters to the TTY because the ^B and a subsequent ^R will be + delayed until we know what the next character is. + + If unsure, say N. + config DEBUG_KERNEL bool "Kernel debugging" help -- cgit v1.2.3