From: Jesse Barnes Fix a stupid bug in the sysrq handling in sn_console.c. Instead of eating all characters in the sysrq string (preventing them from getting to the tty layer), only eat those following 'ESC' since that's a pretty important character for various things. Please apply before 2.6.9 is released as the console is very unfriendly to use without it. Signed-off-by: Jesse Barnes Signed-off-by: Andrew Morton --- 25-akpm/drivers/serial/sn_console.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff -puN drivers/serial/sn_console.c~fix-sysrq-handling-bug-in-sn_consolec drivers/serial/sn_console.c --- 25/drivers/serial/sn_console.c~fix-sysrq-handling-bug-in-sn_consolec Tue Sep 14 16:19:40 2004 +++ 25-akpm/drivers/serial/sn_console.c Tue Sep 14 16:19:40 2004 @@ -596,10 +596,15 @@ sn_receive_chars(struct sn_cons_port *po sysrq_requested = jiffies; sysrq_serial_ptr = sysrq_serial_str; } - continue; /* ignore the whole sysrq string */ + /* + * ignore the whole sysrq string except for the + * leading escape + */ + if (ch != '\e') + continue; } else - sysrq_serial_ptr = sysrq_serial_str; + sysrq_serial_ptr = sysrq_serial_str; #endif /* CONFIG_MAGIC_SYSRQ */ /* record the character to pass up to the tty layer */ @@ -611,8 +616,6 @@ sn_receive_chars(struct sn_cons_port *po if (tty->flip.count == TTY_FLIPBUF_SIZE) break; } - else { - } port->sc_port.icount.rx++; } _