2002-09-27 23:41:20

by Dave Hansen

[permalink] [raw]
Subject: sysrq on serial console

Since the serial cleanups happened in 2.5, Magic Sysrq doesn't work
for me on the serial console.

It looks like the UART_LSR_BI bit needs to be set in the status
variable for the break character to be interpreted as a break in the
driver.

I doubt that it is actually broken, but it isn't immediately obvious
how that bit gets set. Is there something that I should have set when
the device was initialized to make sure that UART_LSR_BI is asserted
in "status" when the interrupt occurs?

--
Dave Hansen
[email protected]


2002-09-28 00:24:27

by H. Peter Anvin

[permalink] [raw]
Subject: Re: sysrq on serial console

Followup to: <[email protected]>
By author: Dave Hansen <[email protected]>
In newsgroup: linux.dev.kernel
>
> Since the serial cleanups happened in 2.5, Magic Sysrq doesn't work
> for me on the serial console.
>

It's been broken for me in several 2.4 versions as well. This is
highly troublesome.

> It looks like the UART_LSR_BI bit needs to be set in the status
> variable for the break character to be interpreted as a break in the
> driver.
>
> I doubt that it is actually broken, but it isn't immediately obvious
> how that bit gets set. Is there something that I should have set when
> the device was initialized to make sure that UART_LSR_BI is asserted
> in "status" when the interrupt occurs?
--
<[email protected]> at work, <[email protected]> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <[email protected]>

2002-09-28 08:00:59

by Russell King

[permalink] [raw]
Subject: Re: sysrq on serial console

On Fri, Sep 27, 2002 at 04:45:12PM -0700, Dave Hansen wrote:
> It looks like the UART_LSR_BI bit needs to be set in the status
> variable for the break character to be interpreted as a break in the
> driver.

That is correct; that is how the UART reports a break character.

> I doubt that it is actually broken, but it isn't immediately obvious
> how that bit gets set. Is there something that I should have set when
> the device was initialized to make sure that UART_LSR_BI is asserted
> in "status" when the interrupt occurs?

Now. Its a status bit from the UART LSR register itself, read from
serial8250_handle_port() and receive_chars(). It will cause an
interrupt any time that the receive interrupt is enabled, ie when
the port is open by user space.

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html