Skip to contentSkip to conversation

more keyboard stuff

PATCH In review [email protected] 2 participants 2 messages Sep 5, 2003 – Sep 19, 2003 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 more keyboard stuff

I looked a bit more at the keyboard code and find a bug and a probable bug.

(i) In case a synaptics touchpad has been detected, the comment says "disable AUX". But we do not set the disable bit, but instead .and. with the bit - no doubt getting zero. This must be a bug.

(ii) Directly above this is the suspicious comment "keyboard translation seems to be always off".
But every machine comes always up in translated scancode 2. Translation is never off. But wait! by mistake the above .and. cleared the XLATE bit.

So, I think bug (i) explains mystery (ii).

However, note that this is code reading only.
I do not have the hardware, so cannot test.

Andries

[line numbers will be off]

drivers/input/serio/i8042.c +1 -7
diff -u --recursive --new-file -X /linux/dontdiff a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -618,16 +619,10 @@
 		(~param >> 4) & 0xf, ~param & 0xf);
 
 /*
- * In MUX mode the keyboard translation seems to be always off.
- */
- 
-	i8042_direct = 1;
-
-/*
  * Disable all muxed ports by disabling AUX.
  */
 
-	i8042_ctr &= I8042_CTR_AUXDIS;
+	i8042_ctr |= I8042_CTR_AUXDIS;
 	i8042_ctr &= ~I8042_CTR_AUXINT;
 
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
#1 lore raw
Quoted 14 lines · On Sat, Sep 06, 2003 at 01:22:44AM +0200, [email protected] wrote:

I looked a bit more at the keyboard code and find a bug and a probable bug.

(i) In case a synaptics touchpad has been detected, the comment says "disable AUX". But we do not set the disable bit, but instead .and. with the bit - no doubt getting zero. This must be a bug.

(ii) Directly above this is the suspicious comment "keyboard translation seems to be always off".
But every machine comes always up in translated scancode 2. Translation is never off. But wait! by mistake the above .and. cleared the XLATE bit.

Quoted 8 lines

So, I think bug (i) explains mystery (ii).

However, note that this is code reading only.
I do not have the hardware, so cannot test.

Andries

[line numbers will be off]

Thanks for spotting this.

Quoted 21 lines

diff -u --recursive --new-file -X /linux/dontdiff a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c

drivers/input/serio/i8042.c +1 -7
@@ -618,16 +619,10 @@
 		(~param >> 4) & 0xf, ~param & 0xf);
 
 /*
- * In MUX mode the keyboard translation seems to be always off.
- */
- 
-	i8042_direct = 1;
-
-/*
  * Disable all muxed ports by disabling AUX.
  */
 
-	i8042_ctr &= I8042_CTR_AUXDIS;
+	i8042_ctr |= I8042_CTR_AUXDIS;
 	i8042_ctr &= ~I8042_CTR_AUXINT;
 
 	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR