Subject: port-i386/483: Keyboard probe bug with Pcvt console driver and AnyKey keyboard
To: None <>
From: Brian Moore <>
List: netbsd-bugs
Date: 09/18/1994 00:05:07
>Number:         483
>Category:       port-i386
>Synopsis:       Keyboard probe bug with Pcvt console driver and AnyKey keyboard
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 18 00:05:04 1994
>Originator:     Brian Moore
"My humble little abode"
>Release:        1.0_BETA
System: NetBSD 1.0_BETA NetBSD 1.0_BETA (MUNCH) #0: Sun Sep 18 01:38:36 EDT 1994 i386

	The pcvt console driver has the old keyboard probe bug for Gateway 2000
	AnyKey keyboards that was fixed with pccons console driver.  Basically
	what would happen is, during boot, the keyboard would fail to be probed
	and you would be unable to type anything.  The only recourse was,
	during the kernel probe stage, hitting the keys on the keyboard like
	mad.  This would allow the keyboard to be probed and everything would
	workfine after that.
	Get one of those wacked out Gateway 2k's with the AnyKey keyboards,
	compile pcvt into your kernel and then reboot.  When the login screen
	comes up you won't be able to type anything.  
	I've already sent Hellmuth this patch.  There just needs to be a delay
	added between a read of the status port on the 8042 and a read of the 
	data port on the 8042.

--- pcvt_kbd.c.orig     Tue Sep 13 18:37:26 1994
+++ pcvt_kbd.c  Sun Sep 18 01:09:11 1994
@@ -539,6 +539,8 @@
        while (!(inb(CONTROLLER_CTRL) & STATUS_OUTPBF))
                if (--timeo == 0)
                        return (-1);
+       delay(6);   /* ziff */
        return ((u_char) inb(CONTROLLER_DATA));