Re: Linux 2.6.0-test9

From: bill davidsen
Date: Mon Oct 27 2003 - 18:49:07 EST


In article <UTC200310261059.h9QAxBS13289.aeb@xxxxxxxxxxx>,
<Andries.Brouwer@xxxxxx> wrote:
| > Pls forward.
|
| Below a keyboard patch I sent to l-k 12 days ago.
| Discussion:
|
| Petr Vandrovec reported
|
| > got (twice, but yesterday I rebooted box hard, as I thought that it is dead)
| > strange lockup, where box stopped reacting on keyboard.
|
| and
|
| > Oct 14 19:59:18 ppc kernel: i8042.c: e0 <- i8042 (interrupt, kbd, 1) [30115341]
| > Oct 14 19:59:18 ppc kernel: i8042.c: ed -> i8042 (kbd-data) [30115342]
| > Oct 14 19:59:18 ppc kernel: i8042.c: fa <- i8042 (interrupt, kbd, 1) [30115346]
| > Oct 14 19:59:18 ppc kernel: atkbd.c: Unknown key released (translated set 2, code 0x165, data 0xfa, on isa0060/serio0).
|
| What happens is that the kernel code does an untranslate on the 0xfa
| that is the ACK for 0xed (set LEDs) when 0xe0 preceded. Now the ACK
| is never seen and we hang waiting for it.
|
| Now 0xfa can be a key scancode or it can be a protocol scancode.
| Only few keyboards use it as a key scancode, and if we always
| interpret it as a protocol scancode then these rare keyboards
| will have a dead key. If we interpret it as a key scancode then
| we have a dead keyboard in case it was protocol.
|
| The below patch moves the test for ACK and NAK up, so that they
| are always seen as protocol.
|
| This is just a minimal patch. What I did in 1.1.54 was to keep track of
| commands sent with a flag reply_expected, so that 0xfa could be taken
| as ACK when a reply is expected and as key scancode otherwise.
| That is the better solution, but requires larger surgery.

I would think that knowing when a reply was coming was very desirable, a
keyboard with dead keys is kind of useless if an application uses them
(like any editor which allows function to keystroke binding).

Since you have done the full fix already, is it practical to do it
quickly now? And how does any fix for this map into "really major
bugs?" If the fix is just going to be queued anyway, it might as well
be done really right, assuming that you have the time and inclination,
of course.

--
bill davidsen <davidsen@xxxxxxx>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/