Subject: Re: WSCONS & serial console tsleep panic
To: None <mark@causality.com>
From: None <drochner@zel459.zel.kfa-juelich.de>
List: tech-kern
Date: 01/22/1999 16:01:45
mark@causality.com said:
> I always get a tsleep panic triggered by pckbd_enqueue_cmd(). 

Oh - this timeout() driven glue stuff - it should go away.
As a workaround - can you try the following?
(It makes the keyboard commands run asynchronously, which has
the side effect that errors are not delivered to the caller.
However - if an error occures here, you are lost anyway.)

best regards
Matthias

Index: dev/pckbc/pckbd.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pckbc/pckbd.c,v
retrieving revision 1.15
diff -c -2 -r1.15 pckbd.c
*** pckbd.c	1998/09/17 18:21:04	1.15
--- pckbd.c	1999/01/22 14:56:43
***************
*** 359,363 ****
  		cmd[0] = KBC_ENABLE;
  		res = pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
! 					cmd, 1, 0, 1, 0);
  		if (res) {
  			printf("pckbd_enable: command error\n");
--- 359,363 ----
  		cmd[0] = KBC_ENABLE;
  		res = pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
! 					cmd, 1, 0, 0, 0);
  		if (res) {
  			printf("pckbd_enable: command error\n");
***************
*** 376,380 ****
  		cmd[0] = KBC_DISABLE;
  		res = pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
! 					cmd, 1, 0, 1, 0);
  		if (res) {
  			printf("pckbd_disable: command error\n");
--- 376,380 ----
  		cmd[0] = KBC_DISABLE;
  		res = pckbc_enqueue_cmd(sc->id->t_kbctag, sc->id->t_kbcslot,
! 					cmd, 1, 0, 0, 0);
  		if (res) {
  			printf("pckbd_disable: command error\n");