Subject: Re: page-up with 1.5.1-GENERIC
To: Edouard G. Parmelan <egp@free.fr>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: port-macppc
Date: 07/14/2001 20:15:19
"Edouard G. Parmelan" <egp@free.fr> writes:

> NetBSD-1.5.1 enter ddb as soon as I press page-up key on my iBook Dual
> USB.  This _was_ a known issue, but I use GENERIC kernel.  Is
> unsupported keyboard patch include in official 1.5.1-GENERIC kernel ?
> http://www.netbsd.org/Ports/macppc/faq.html#power-off
> 
> Unfortunary, at db> prompt, any key I press re-enter ddb :-(
> 
>     trap 400 at 55555554
> 
> It's 100% reproductible.
> 
> Is it solved in -current ?   If not, how can I better debug that ?

The problem is known but not totally solved. Apply the following patch
to sys/arch/macppc/dev/akbd.c:

Index: akbd.c
===================================================================
RCS file: /cvsroot/syssrc/sys/arch/macppc/dev/akbd.c,v
retrieving revision 1.15
diff -c -r1.15 akbd.c
*** akbd.c	2001/07/12 04:16:58	1.15
--- akbd.c	2001/07/15 00:12:07
***************
*** 481,492 ****
--- 481,494 ----
  		wskbd_input(sc->sc_wskbddev, type, val);
  		type = WSCONS_EVENT_KEY_UP;
  		break;
+ #if 0 /* XXX 244 is the same keycode as pageup on newer laptops */
  	case 245:
  		pm_eject_pcmcia(0);
  		break;
  	case 244:
  		pm_eject_pcmcia(1);
  		break;
+ #endif
  	}
  
  	if (adb_polling)



The issue with fixing it long-term is that we'd like to have the
pcmcia-eject feature on those machines (2400s, others?), so we need
some way to distinguish, earlier, whether it's appropriate to invoke
PCMCIA functions.

I'm inclined to commit this or something like it, though; it's a
really annoying problem on basically all post-2400 laptops, and makes
for a bad user impression. Maybe put it under "ifdef
PB2400_PCMCIA_EJECT"?

        - Nathan