Skip to contentSkip to conversation

Dell Latitude CPi keyboard problems since 2.5.42

DISCUSSION Mikael Pettersson 3 participants 4 messages Jan 27, 2003 – Jan 28, 2003 Input drivers

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines · Vojtech Pavlik
Quoted 2 lines

Either removing the SSCANSET from atkbd_cleanup(), or changing atkbd->oldset from 22 to 2, solves my CPi's keyboard problems.

Can you try with the attached atkbd.c? It uses RESET_BAT instead of SSCANSET, which will slow down the reboot a bit, but should be very safe to bring the keyboard to its power-on state, which the BIOS should be able to handle.

I tried it, and the change to use RESET_BAT in atkbd_cleanup() works fine. Tested on my Dell Latitiude CPi and four desktop boxes of various vintages. No new problems. A reboot takes maybe 1/10 of a second longer, but I don't care.

However, your version of atkbd.c caused a linkage error due to a reference to input_regs() in atkbd_interrupt(). I extracted just the changes to atkbd_cleanup() and atkbd_command(), but that left me with a dead keyboard on the first test box. In the end I kept only the atkbd_cleanup() change and the increased timeout for RESET_BAT in atkbd_command() [see below].

/Mikael

drivers/input/keyboard/atkbd.c renamed from drivers/input/keyboard/atkbd.c.~1~ +4 -1
@@ -233,6 +233,9 @@
 	int i;
 
 	atkbd->cmdcnt = receive;
+
+	if (command == ATKBD_CMD_RESET_BAT)
+		timeout = 200000; /* 2 sec */
 	
 	if (command & 0xff)
 		if (atkbd_sendbyte(atkbd, command & 0xff))
@@ -442,7 +445,7 @@
 static void atkbd_cleanup(struct serio *serio)
 {
 	struct atkbd *atkbd = serio->private;
-	atkbd_command(atkbd, &atkbd->oldset, ATKBD_CMD_SSCANSET);
+	atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT);
 }
 
 /*
#1 lore raw
Quoted 14 lines · Mikael Pettersson
Quoted 7 lines · Vojtech Pavlik
Quoted 2 lines

Either removing the SSCANSET from atkbd_cleanup(), or changing atkbd->oldset from 22 to 2, solves my CPi's keyboard problems.

Can you try with the attached atkbd.c? It uses RESET_BAT instead of SSCANSET, which will slow down the reboot a bit, but should be very safe to bring the keyboard to its power-on state, which the BIOS should be able to handle.

I tried it, and the change to use RESET_BAT in atkbd_cleanup() works fine. Tested on my Dell Latitiude CPi and four desktop boxes of various vintages. No new problems. A reboot takes maybe 1/10 of a second longer, but I don't care.

Quoted 6 lines

However, your version of atkbd.c caused a linkage error due to a reference to input_regs() in atkbd_interrupt(). I extracted just the changes to atkbd_cleanup() and atkbd_command(), but that left me with a dead keyboard on the first test box. In the end I kept only the atkbd_cleanup() change and the increased timeout for RESET_BAT in atkbd_command() [see below].

Good. I'll do more tests here and find the problem which left you without the keyboard - the current atkbd.c I sent you is fairly untested.

Quoted 24 lines

/Mikael

drivers/input/keyboard/atkbd.c renamed from drivers/input/keyboard/atkbd.c.~1~ +4 -1
@@ -233,6 +233,9 @@
 	int i;
 
 	atkbd->cmdcnt = receive;
+
+	if (command == ATKBD_CMD_RESET_BAT)
+		timeout = 200000; /* 2 sec */
 
 	if (command & 0xff)
 		if (atkbd_sendbyte(atkbd, command & 0xff))
@@ -442,7 +445,7 @@
 static void atkbd_cleanup(struct serio *serio)
 {
 	struct atkbd *atkbd = serio->private;
-	atkbd_command(atkbd, &atkbd->oldset, ATKBD_CMD_SSCANSET);
+	atkbd_command(atkbd, NULL, ATKBD_CMD_RESET_BAT);
 }
 
 /*
Signature · 2 lines
Vojtech Pavlik
SuSE Labs
#2 lore raw
In reply to Mikael Pettersson
Quoted 6 lines · Mikael Pettersson

However, your version of atkbd.c caused a linkage error due to a reference to input_regs() in atkbd_interrupt(). I extracted just the changes to atkbd_cleanup() and atkbd_command(), but that left me with a dead keyboard on the first test box. In the end I kept only the atkbd_cleanup() change and the increased timeout for RESET_BAT in atkbd_command() [see below].

Just as another point of reference, I tested your patch with only the RESET_BAT changes and it worked on my machine as well.

Later,
Tom

#3 lore raw
Quoted 10 lines · Tom Sightler
Quoted 6 lines · Mikael Pettersson

However, your version of atkbd.c caused a linkage error due to a reference to input_regs() in atkbd_interrupt(). I extracted just the changes to atkbd_cleanup() and atkbd_command(), but that left me with a dead keyboard on the first test box. In the end I kept only the atkbd_cleanup() change and the increased timeout for RESET_BAT in atkbd_command() [see below].

Just as another point of reference, I tested your patch with only the RESET_BAT changes and it worked on my machine as well.

Great.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs