Subject: Re: Broken keyboard NOT broken anymore.
To: Mike Sienicki <mike@cpdist.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: port-i386
Date: 11/09/1999 20:09:31
mike@cpdist.com said:
> getting this UMC based motherboard to run NetBSD! 

Good that it works. I'd however feel better with a solution
which works out of the box.
I've appended a patch which tries to unwedge the keyboard
after the mouse probe. If you feel adventurous some day, could
you try it (with an enabled pms or opms), and if it works,
try what happens if you use only the first or second half
of the patch (ie flush only, or reset only)?

best regards
Matthias


Index: pckbc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/isa/pckbc.c,v
retrieving revision 1.12
diff -u -r1.12 pckbc.c
--- pckbc.c	1999/03/05 10:40:54	1.12
+++ pckbc.c	1999/11/05 14:23:02
@@ -475,6 +475,18 @@
 		printf("kbc: aux port test: %x\n", res);
 #endif
 
+	/* flush */
+	while (pckbc_poll_data1(iot, ioh_d, ioh_c, PCKBC_KBD_SLOT, 0)
+	       != -1);
+
+	/* reset keyboard */
+	{
+		u_char cmd[1], resp[1];
+		cmd[0] = 0xff;
+		pckbc_poll_cmd(t, PCKBC_KBD_SLOT,
+			       cmd, 1, 1, resp, 1);
+	}
+
 	/* enable needed interrupts */
 	t->t_cmdbyte |= cmdbits;
 	if (!pckbc_put8042cmd(t))