aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/serial_core.h
diff options
context:
space:
mode:
authorDmitry Safonov <dima@arista.com>2020-03-02 17:51:35 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-07 09:52:02 +0100
commit68af43173d3fcece70bef49cb992c64c4c68ff23 (patch)
treeafb70c4f7e9f9502e4afcbc896f43155ebc7571c /include/linux/serial_core.h
parentsysctl/sysrq: Remove __sysrq_enabled copy (diff)
downloadwireguard-linux-68af43173d3fcece70bef49cb992c64c4c68ff23.tar.xz
wireguard-linux-68af43173d3fcece70bef49cb992c64c4c68ff23.zip
serial/sysrq: Add MAGIC_SYSRQ_SERIAL_SEQUENCE
Many embedded boards have a disconnected TTL level serial which can generate some garbage that can lead to spurious false sysrq detects. Currently, sysrq can be either completely disabled for serial console or always disabled (with CONFIG_MAGIC_SYSRQ_SERIAL), since commit 732dbf3a6104 ("serial: do not accept sysrq characters via serial port") At Arista, we have such boards that can generate BREAK and random garbage. While disabling sysrq for serial console would solve the problem with spurious false sysrq triggers, it's also desirable to have a way to enable sysrq back. As a measure of balance between on and off options, add MAGIC_SYSRQ_SERIAL_SEQUENCE which is a string sequence that can enable sysrq if it follows BREAK on a serial line. The longer the string - the less likely it may be in the garbage. Having the way to enable sysrq was beneficial to debug lockups with a manual investigation in field and on the other side preventing false sysrq detections. Based-on-patch-by: Vasiliy Khoruzhick <vasilykh@arista.com> Signed-off-by: Dmitry Safonov <dima@arista.com> Link: https://lore.kernel.org/r/20200302175135.269397-3-dima@arista.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serial_core.h')
-rw-r--r--include/linux/serial_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h
index 52404ef1694e..1f4443db5474 100644
--- a/include/linux/serial_core.h
+++ b/include/linux/serial_core.h
@@ -243,6 +243,7 @@ struct uart_port {
unsigned long sysrq; /* sysrq timeout */
unsigned int sysrq_ch; /* char for sysrq */
unsigned char has_sysrq;
+ unsigned char sysrq_seq; /* index in sysrq_toggle_seq */
unsigned char hub6; /* this should be in the 8250 driver */
unsigned char suspended;