Subject: port-i386/14734: i386 & pckbc console keyboard attach is broken
To: None <gnats-bugs@gnats.netbsd.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: netbsd-bugs
Date: 11/26/2001 13:41:08
>Number:         14734
>Category:       port-i386
>Synopsis:       i386 & pckbc console keyboard attach is broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 26 04:42:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Lennart Augustsson
>Release:        NetBSD 1.5Y
>Organization:
>Environment:
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
Architecture: i386
Machine: i386
>Description:
	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.
>How-To-Repeat:
	Try to use a USB keyboard as console with pckbc configured.
>Fix:
	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.
>Release-Note:
>Audit-Trail:
>Unformatted: