Subject: port-i386/14734: i386 & pckbc console keyboard attach is broken
To: None <email@example.com>
From: Lennart Augustsson <firstname.lastname@example.org>
Date: 11/26/2001 13:41:08
>Synopsis: i386 & pckbc console keyboard attach is broken
>Arrival-Date: Mon Nov 26 04:42:00 PST 2001
>Originator: Lennart Augustsson
>Release: NetBSD 1.5Y
System: NetBSD hobbes 1.5Y NetBSD 1.5Y (HOBBES) #0: Sun Nov 25 21:20:34 MET 2001 lennart@hobbes:/usr/src/sys/arch/i386/compile/HOBBES i386
When attaching the console keyboard (sys/arch/i386/i386/consinit.c)
there is a static check if there is a PCKBC (note, PCKBC, not PCKBD)
configuered. If there is, pckbc_cnattach() is called. This
unconditionally attaches the pckbd keyboard as console, even
if there is none. This means that if pckbc is configured in the
kernel no other keyboard (like USB) can become console.
Try to use a USB keyboard as console with pckbc configured.
First, the call to pckbc_cnattach() should check the return
code, and if it fails it should give ukbd_cnattach() a chance.
Second, pckbc_cnattach() (in sys/dev/pckbc/pckbd.c) needs to
be fixed. There is provision for this to fail when there is
no keyboard, but this has been commented out. This means
that it will never fail, even if there is no keyboard present.