Subject: PMS driver locks keyboard at boot
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Duncan McEwan <duncan@Comp.VUW.AC.NZ>
List: current-users
Date: 04/20/1994 15:36:55
I've been modifying the PS2 mouse driver posted to the netbsd-current list last
year by Shoji Yuen <yuen@nuie.nagoya-u.ac.jp>, to make it work with the new
config scheme introduced around the end of March.  I was able to get the driver
working in a kernel built from sources supped around the 6th of April.

Then I tried putting it in a kernel supped on April 14th.  This required
additional changes in pmsattach to set up the "struct intrhand" and pmsintr
because its argument changed from an "int" to a "struct pms_softc".

When I boot this kernel, I don't get any response from the console keyboard
until after some process opens the pms device.  After that, the keyboard works
fine.  I tried moving all the statments in pmsopen that messed with device
registers to pmsprobe, but that didn't make any difference.  I also tried
commenting out statements in pmsprobe that appeared to be disabling mouse
device interupts, but that also had no effect.

My current (ugly) workaround for the problem is to do an "echo > /dev/pms0"
in /etc/rc...!

I don't know anything about how the keyboard and ps/2 mouse devices interact
(there is obviously some interaction since they use the same i/o address).  I
also don't know what is going on with the new config and interupt registration
code ... I simply copied what another driver (lms.c) was doing, so it's
likely that I've made some mistake there.

If there is anyone who could provide information to help me get this working I
would appreciate it.  And if someone wants to take a look at the driver and see
what I'm doing wrong, that would be great.

(One other point that may be relevant.  Even without the pms driver in the
kernel, my keyboard seems to be one of the ones that locks up on boot unless
you hit keys during autoconfig.  I have installed patches to pccons.c, posted
to the current mailing list by Mike Long in early April which "fix" this
problem, but with the pms driver and these patches, the lockup still happens as
described above).

Duncan

------------------------------------------------------------------------------