Subject: dead keyboard on -current/i386: pckbd_enable: command error
To: None <tech-kern@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 07/26/2006 02:40:13
After trying to boot a -current kernel on my home PC (w/ PS/2 keybord and 
mouse, and 3.0 userland), the keyboard seems to be dead (mouse works fine) 
on 4 out of 5 reboots. The keyboard works fine with NetBSD 3.0/i386, and I 
wonder what's happening, esp. as I've also seen those keyboard failures 
with -current inside qemu.

Here's what -current dmesg has:

 	pckbc0 at isa0 port 0x60-0x64
 	pckbd: error setting scanset 2
 	pckbd0 at pckbc0 (kbd slot)
===>	pckbd: error setting scanset 2
 	pckbc0: using irq 1 for kbd slot
 	wskbd0 at pckbd0 mux 1
===>	pckbd_enable: command error
===>	wskbd0: attach error=5
 	pms0 at pckbc0 (aux slot)
 	pckbc0: using irq 12 for aux slot
 	wsmouse0 at pms0 mux 0

while 3.0 says:

 	pckbc0 at isa0 port 0x60-0x64
 	pckbd: error setting scanset 2
 	pckbd0 at pckbc0 (kbd slot)
 	pckbc0: using irq 1 for kbd slot
 	wskbd0 at pckbd0: console keyboard, using wsdisplay0
 	pms0 at pckbc0 (aux slot)
 	pckbc0: using irq 12 for aux slot
 	wsmouse0 at pms0 mux 0

I've tried poking around in src/sys/dev/pckbport and tried disabling the 
powerhook, but that didn't make a difference.

Under what conditions would the pckbport_poll_cmd() call in the following 
code fail:

                 cmd[0] = KBC_ENABLE;
                 res = pckbport_poll_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
                                         cmd, 1, 0, NULL, 0);
                 if (res) {
                         printf("pckbd_enable: command error\n");
                         return (res);
                 }

I tried using a "slow" parameter of 1 here (in the last parameter to the 
pckbport_poll_cmd() call), but that didn't make the keyboard reliable 
either.

Needless to say, I don't have any clue on the underlying hardware.
If anyone has some clue on what might be wrong, please let me know.

Thanks!


  - Hubert