lkml.org 
[lkml]   [1999]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch] minor fix of MAGIC SYS RQ key [was RE: MAGIC SYS RQ Key]
Date
When using the magic sysrq key, if you release Alt before you release SysRq
the Alt key gets stuck down. The root cause is that the up/down state of
Alt is updated correctly in key_down but NOT in k_down. This persists until
compute_shiftstate gets called (when you switch virtual consoles or press
Ctrl-Alt-Shift together or ... probably other scenarios).

The "mini" patch included at the bottom of this message fixes the problem.
The patch is against 2.2.7.

I would appreciate feedback from anyone that has experienced this glitch
(and/or also from the maintainer of drivers/char/keyboard.c).

This is my very first patch. Be kind. :-)

Eric



> I can reproduce this everytime now (even after switching
> virtual consoles).
> Press Alt, SysRq, Space, and then release Space, Alt, SysRq.
> It beeps on
> most keystrokes after that until I press Ctrl-Shift-Alt and release.
>
> I have a couple other things competing for my time but I'm
> looking at the
> source as I get spare moments to see if I can figure out
> where it's getting
> off the train at the wrong station.
>
> Eric
>
>
> > -----Original Message-----
> > From: Meelis Roos [mailto:mroos@tartu.cyber.ee]
> > Sent: Friday, May 07, 1999 5:36 AM
> > To: mikeg@weiden.de; linux-kernel@vger.rutgers.edu
> > Subject: Re: MAGIC SYS RQ Key
> >
> >
> > MG> Here the problem does show itself, but only until the
> > first vt change
> > MG> after a fresh boot. The symptoms are slightly different
> > in that entering
> > MG> an invalid SysRq displays usage message, but anything
> > after that just
> > MG> beeps.. until a valid SysRq or vt change. After one vt
> > change, the bug
> > MG> hides until reboot. (k2.2.7 and cherry kbd)
> >
> > This may be related to the order of key releases after sysrq. If I
> > release alt before prtscr, the alt key gets stuck. Pressing and
> > releasing alt helps. Maybe you are hitting the same problem?
> >
> > --
> > Meelis Roos (mroos@tartu.cyber.ee)
> >

--patch--

--- linux-2.2.7/drivers/char/keyboard.c Mon Apr 26 14:21:42 1999
+++ linux/drivers/char/keyboard.c Fri May 7 16:55:47 1999
@@ -247,9 +247,10 @@
sysrq_pressed = !up_flag;
return;
} else if (sysrq_pressed) {
- if (!up_flag)
+ if (!up_flag) {
handle_sysrq(kbd_sysrq_xlate[keycode], kbd_pt_regs,
kbd, tty);
- return;
+ return;
+ }
}
#endif

-
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/
\
 
 \ /
  Last update: 2005-03-22 13:51    [W:0.100 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site