Subject: Re: Uh-oh... Broken keyboard input.
To: Dave Huang <khym@bga.com>
From: Matthias Drochner <M.Drochner@fz-juelich.de>
List: port-i386
Date: 11/12/1999 19:02:50
khym@bga.com said:
> I applied your patch, but it didn't help :( Here are the boot messages
> (with "options PCKBCDEBUG"): 

Thanks - at least I know now where the debug messages can be improved:-)
The "timeout"s look evil - as if the controller is seriously wedged.
We probably have to avoid the mouse probe completely instead of trying
to unwedge the controller after that.
The appended patch tries to check whether the "mouse interrupt enable"
bit the in controller command word can be set. It might be hardwired
to "1" in your controller, then the patch should help. Or the controller
overloads it with something else, then it might be harmful.
(I didn't find any reasonable documentation for old keyboard controllers.)
Can you give it a try?

best regards
Matthias


Index: pckbc.c
===================================================================
RCS file: /cvsroot/syssrc/sys/dev/isa/pckbc.c,v
retrieving revision 1.12
diff -c -r1.12 pckbc.c
*** pckbc.c	1999/03/05 10:40:54	1.12
--- pckbc.c	1999/11/12 17:58:37
***************
*** 454,459 ****
--- 454,472 ----
  		cmdbits |= KC8_KENABLE;
  #endif /* 0 */
  
+ 	t->t_cmdbyte |= KC8_MENABLE;
+ 	if (!pckbc_put8042cmd(t))
+ 		printf("kbc: cmd word write error\n");
+ 	if (!pckbc_get8042cmd(t))
+ 		printf("kbc: cmd word read error\n");
+ 	if (!(t->t_cmdbyte & KC8_MENABLE)) {
+ 		printf("NO MOUSE PORT\n");
+ 		goto out;
+ 	}
+ 	t->t_cmdbyte &= ~KC8_MENABLE;
+ 	if (!pckbc_put8042cmd(t))
+ 		printf("kbc: cmd word write error\n");
+ 
  	/*
  	 * check aux port ok
  	 */
***************
*** 475,480 ****
--- 488,494 ----
  		printf("kbc: aux port test: %x\n", res);
  #endif
  
+ out:
  	/* enable needed interrupts */
  	t->t_cmdbyte |= cmdbits;
  	if (!pckbc_put8042cmd(t))