Re: test6pre1 change for sysrq config-option

From: Philipp Rumpf (prumpf@parcelfarce.linux.theplanet.co.uk)
Date: Thu Aug 03 2000 - 15:58:44 EST


On Thu, Aug 03, 2000 at 06:26:50PM +0200, Juan J. Quintela wrote:
> >>>>> "tytso" == Theodore Ts'o <tytso@mit.edu> writes:
>
> Hi
>
> tytso> 1) Serial sysrq is reported no to work for 2.4 kernels.
>
> tytso> I haven't heard of any such reports. I'm currently on the road right
> tytso> now, so I can't test this right away. If someone running 2.4.0test5 can
> tytso> test this and confirm/deny this claim, I would appreciate it. If it
> tytso> doesn't work, full debugging particulars would be appreciate it.
>
> SysRq don't work here over serial console (has never worked
> ok). Phillip Rumpf solved my problems. I thought that you had the
> patch. This is the patch actualized to test6-pre1.

He has. He also pointed out how it was broken and how to fix it; at that
point my impression was tytso had the fix in his driver and it would be in
the next released version.

> static inline void wait_for_xmitr(struct async_struct *info)
> {
> unsigned int tmout = 1000000;
> + unsigned int status;
>
> - while (--tmout &&
> - ((serial_in(info, UART_LSR) & BOTH_EMPTY) != BOTH_EMPTY));
> + do {
> + status = serial_in(info, UART_LSR);
> +
> + if (status & UART_LSR_BI)
> + break_pressed = jiffies|1;

At the very least, you need an additional serial_in(info, UART_RX); here
(which will read the 0 byte that ends up in our FIFO when a break is
received). I am not sure that will work as it should though.

> diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/kernel/sysctl.c working/kernel/sysctl.c
> --- base/kernel/sysctl.c Fri Jul 28 16:54:50 2000
> +++ working/kernel/sysctl.c Wed Aug 2 14:24:51 2000
> @@ -216,7 +216,7 @@
> {KERN_SEM, "sem", &sem_ctls, 4*sizeof (int),
> 0644, NULL, &proc_dointvec},
> #endif
> -#ifdef CONFIG_MAGIC_SYSRQ
> +#if defined(CONFIG_VT) && defined(CONFIG_MAGIC_SYSRQ)
> {KERN_SYSRQ, "sysrq", &sysrq_enabled, sizeof (int),
> 0644, NULL, &proc_dointvec},
> #endif

That is the yucky version. serial.c really should check sysrq_enabled
itself.

        Philipp Rumpf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:11 EST