NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/42108: Old Compaq Presario: Keyboard trouble with ACPI
>Number: 42108
>Category: kern
>Synopsis: Old Compaq Presario: Keyboard trouble with ACPI
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 22 01:55:00 +0000 2009
>Originator: Dave J. Barnes
>Release: netbsd-5.0.1
>Organization:
Eng Consultant
>Environment:
NetBSD djb-cp 5.0.1 NetBSD 5.0.1 (i386/DJB-laptop 2009/08/26) #47: Mon Sep 21
20:07:53 CDT 2009
root@Shakeys:/Shakeys/NetBSD/src/usr/src/sys/arch/i386/compile/DJB i386
>Description:
With NetBSD 5.0.1 laptop keyboard does not function. Keyboard worked
fine with 4.0.
With debugging code added and a test fix applied:
...
attimer1: attached to pcppi0
pckbport_poll: loops 10 response: fa
pckbport_poll2: loops 99 response: fe
pckbdprobe: reset response 0xfe
pckbport_poll: loops 10 response: fa
pckbport_poll2: loops 99 response: aa
pckbport_poll: loops 10 response: fa
pckbport_poll2: loops 99 response: aa
pckbdprobe again: reset response 0xaa
...
First response from the keyboard controller is 0xfe not 0xaa as expected. A
retry
that resets the keyboard controller twice gets correct value.
Diff for dev/pckbport/pckbd.c attached:
>How-To-Repeat:
No keyboard with ACPI with generic kernel. Disable ACPI then no interrupts for
PCMCIA thus no network. boot -c and disable
"pckbc* at acpi" has additional problems.
>Fix:
diff:
-------------------------------
--- dev/pckbport/pckbd.c.orig 2009-09-20 19:42:01.000000000 -0500
+++ dev/pckbport/pckbd.c 2009-09-20 21:24:14.000000000 -0500
@@ -329,7 +329,23 @@
}
if (resp[0] != KBR_RSTDONE) {
printf("pckbdprobe: reset response 0x%x\n", resp[0]);
- return 0;
+/* return 0; */
+
+/* XXX Should we check the return codes more carefully? */
+ if (resp[0] == KBR_RESEND) {
+ /* Damn Intel chip -- let's try again */
+ pckbport_flush(pa->pa_tag, pa->pa_slot);
+ cmd[0] = KBC_RESET;
+ res = pckbport_poll_cmd(pa->pa_tag, pa->pa_slot, cmd,
1, 1, resp, 1);
+
+ pckbport_flush(pa->pa_tag, pa->pa_slot);
+ cmd[0] = KBC_RESET;
+ res = pckbport_poll_cmd(pa->pa_tag, pa->pa_slot, cmd,
1, 1, resp, 1);
+
+ printf("pckbdprobe again: reset response 0x%x\n",
resp[0]);
+ if (resp[0] != KBR_RSTDONE) return 0;
+ }
+
}
/*
======================================
May not need to check the return code, just hammer the keyboard controller
again if the response isn't right. The code retries only if we get a resend
from the controller (to a reset command?!?). Second time I've seen this
problem, see PR/20433.
BTW: I tried mycroft's fix as in 20433:
pckbport_poll: loops 10 response: fa
pckbport_poll2: loops 99 response: fe
pckbdprobe: reset response 0xfe
pckbport_poll: loops 10 response: fa
pckbport_poll2: loops 99 response: aa
pckbport_poll: loops 10 response: fa
pckbport_poll2: loops 99 response: aa
pckbdprobe again: reset response 0xaa
Got the exact same thing, 0xfe. The only way out is to hit the controller with
reset a couple of times if it messes up. Argh!
Home |
Main Index |
Thread Index |
Old Index