Skip to contentSkip to conversation

Adding ctrl-o sysrq hack support to 8250 driver

RFC PATCH Milton Miller 1 participant 1 message Dec 8, 2005

lore
Share & tools
lore
#0 lore raw
Quoted 34 lines · Russell King
Quoted 3 lines · Olaf Hering
Quoted 1 line · Russell King

I'm still highly concerned about this whole idea. Applying this

patch

Quoted 1 line
Quoted 1 line

_will_ without doubt inconvenience a lot of people who expect ^O

to be

Quoted 3 lines
Quoted 1 line

received as normal.

If one boots with 'console=ttyS0', the 'ctrl o' should be handled

only

Quoted 1 line

on ttyS0. However, I'm not sure if anyone uses ^O in this situation

via

Quoted 3 lines

the system console. In our case, ttyS0 is automatically activated via add_preferred_console in arch/powerpc/kernel/setup-common.c. If there is a clever way to handle ^O only for the system console,

would

Quoted 1 line

such a patch be accepted? I'm currently looking through the code to

see

Quoted 1 line

how it could be done.

Easily. Have a look at the internals of uart_handle_break() in include/linux/serial_core.h

However, please be aware that ^O is the default control character for "flush output" which I think is something you may want to use with a serial console. Eg:

speed 38400 baud; rows 0; columns 0; line = 1;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
^^^^^^^^^^^

Quoted 3 lines

Hence it's a poor choice. Maybe picking a character which isn't already used by default for another purpose would be appropriate? '^]', the classic telnet escape character maybe?

Aaarrrrhh NO!

Don't you ever login to a box to telent somewhere else?

I don't want to way 5 seconds to disconnect my telnet from the hung remote machine (or do a saK either).

If this goes in, perhaps a parameter (which automatically shows up in sysfs) to change it on the fly? (ok, something tied to the class device rather than the serial module would be nicer).

milton

[Hopefully I got all the cc's, I'm not subscribed]