NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52070: Keyboard freeze after using touchpad



Robert Elz <kre%munnari.OZ.AU@localhost> écrit :
> 
> From: Robert Elz <kre%munnari.OZ.AU@localhost>
> To: gnats-bugs%NetBSD.org@localhost
> Cc: 
> Subject: Re: kern/52070: Keyboard freeze after using touchpad
> Date: Tue, 14 Mar 2017 21:28:52 +0700
> 
>      Date:        Tue, 14 Mar 2017 13:30:01 +0000 (UTC)
>      From:        Martin Husemann <martin%duskware.de@localhost>
>      Message-ID:  <20170314133001.98DA57A28E%mollari.NetBSD.org@localhost>
>  
>    |  Just to see if this gets us any further, could you try the patch below
>    |  (and PMSDEBUG, ...)
>  
>  And the other debugs as well (PCKBCDEBUG etc).
>  
>  But I don't think the patch as is will help, it appears to #if 0
>  away the:
>                  if (pckbc_attach_slot(sc, PCKBC_AUX_SLOT))
>                          cmdbits |= KC8_MENABLE;
>  and if that doesn't happen nothing is likely improve things.
>  
>  So, Marc, try Martin's patch, but also try inserting
>  
>  #endif just before the two lines I included above, and #if 0
>  immediately after (so those two lines effectively get excluded
>  from the code that Martin suggests you try deleting.)

I must have missed something because the new kernel crashed at
boot time printing:

wskbd1 at pckbd1panic: kernel diagnostic assertion "wskbd_console_device == NULL" failed file "../../../../dev/wscons/wskbd.c", line 493

Options added to GENERIC config file:

> options               PMSDEBUG
> options               PCKBCDEBUG
> options               PCKBPORTDEBUG

Patch:

--- pckbc.c.orig	2016-07-14 18:41:13.000000000 +0200
+++ pckbc.c	2017-03-14 16:11:34.735104163 +0100
@@ -278,13 +278,13 @@
 {
 	struct pckbc_internal *t;
 	bus_space_tag_t iot;
-	bus_space_handle_t ioh_d, ioh_c;
-	int res;
+	bus_space_handle_t /* ioh_d, */ ioh_c;
+	// int res;
 	u_char cmdbits = 0;
 
 	t = sc->id;
 	iot = t->t_iot;
-	ioh_d = t->t_ioh_d;
+	// ioh_d = t->t_ioh_d;
 	ioh_c = t->t_ioh_c;
 
 	t->t_pt = pckbport_attach(t, &pckbc_ops);
@@ -323,8 +323,11 @@
 		if (res != 0)
 			printf("pckbc: returned %x on kbd slot test\n", res);
 #endif
+#endif
 		if (pckbc_attach_slot(sc, PCKBC_KBD_SLOT))
 			cmdbits |= KC8_KENABLE;
+
+#if 0
 	} else {
 		printf("pckbc: kbd port test: %x\n", res);
 		return;
@@ -348,6 +351,8 @@
 		goto nomouse;
 	}
 	t->t_haveaux = 1;
+
+#if 0
 	bus_space_write_1(iot, ioh_d, 0, 0x5a); /* a random value */
 	res = pckbc_poll_data1(t, PCKBC_AUX_SLOT);
 
@@ -381,6 +386,7 @@
 #endif
 		t->t_haveaux = 0;
 	}
+#endif
 
 nomouse:
 	/* enable needed interrupts */


Home | Main Index | Thread Index | Old Index