Subject: The saga of the PS/2 mouse drive goes on...
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Peter Galbavy <P.Galbavy@wonderland.org>
List: current-users
Date: 01/15/1994 17:52:00
Hi all,

After trying to get the ******* pms driver working, and then seeing
the patches from people I tried to get this thing going. For me
it's pretty important as I now have an IBM Thinkpad 350/C (you
know, the one with the nipple in the middle of the keyboard), and
only one serial port.  To be able to be "on the net" and using X
at the same time the ps2 mouse is mandatory (until I find out
whether the PCMCIA modem will work :-)

Anyway, what I found was that the driver in current *almost* works
for me.  The problem was that the lines disabling the interrupts
also killed the keyboard interrupts... Judicious use of #if 0 ...
#endif around the right lines, and the PMS_MAGIC_[12] lines, and
finally explicity enabling the interupts to wake up the keyboard
got the ing working (or at least output data). Patches below...
Anyone with hardware info would be very welcome to let me know more
:-)

Now of course using X is a different matter - and if anyone knows what to
put in the Xconfig file to make it work *please* let me know. I have tried:

	Microsoft	"/dev/pms0"
and
	PS/2		"/dev/pms0"
and
	****		"/dev/pms0"

and more, all equally unsuccessfully... the Microsoft entry make the mouse
jump to the top of the screen and mode horizontally only... are these symptoms
you recognize ?

Ta all,
-- 
Peter Galbavy				e-mail: P.Galbavy@wonderland.org
Wonderland				  work: P.Galbavy@micromuse.co.uk

	  "And you will know exactly who you are, forever,
		by knowing what it is that you love."

*** pms.c.orig	Thu Jan 13 21:41:28 1994
--- pms.c	Fri Jan 14 08:06:52 1994
***************
*** 143,149 ****
--- 143,151 ----
  	pms_aux_cmd(ioport, PMS_MAGIC_1);
  	pms_aux_cmd(ioport, PMS_MAGIC_2);
  	c = inb(ioport+DATA);
+ #if 0
  	pms_pit_cmd(ioport, PMS_INT_DISABLE);
+ #endif
  	if (c & 0x04)
  		return 0;
  	return 1;
***************
*** 159,164 ****
--- 161,167 ----
  	pmsaddr[unit] = ioport;
  
  	/* Disable mouse interrupts and initialize */
+ #if 0
  	pms_pit_cmd(ioport, PMS_INT_DISABLE);
  	pms_aux_cmd(ioport, PMS_AUX_ENABLE);
  	pms_dev_cmd(ioport, PMS_DEV_ENABLE);
***************
*** 169,175 ****
--- 172,183 ----
  	pms_dev_cmd(ioport, 100);	/* 100 samples/sec */
  	pms_dev_cmd(ioport, PMS_SET_STREAM);
  	pms_dev_cmd(ioport, PMS_DEV_DISABLE);
+ 	pms_pit_cmd(ioport, PMS_INT_DISABLE);
+ #endif
+ 	pms_flush(ioport);
  	pms_aux_cmd(ioport, PMS_AUX_DISABLE);
+ 	pms_pit_cmd(ioport, PMS_INT_ENABLE);
+ 	pms_flush(ioport);
  
  	/* Setup initial driver state */
  	sc->state = 0;
***************
*** 211,219 ****
--- 219,229 ----
  	sc->inq.count = sc->inq.first = sc->inq.last = 0;
  
  	/* Enable Bus Mouse interrupts */
+ 	pms_flush(ioport);
  	pms_aux_cmd(ioport, PMS_AUX_ENABLE);
  	pms_pit_cmd(ioport, PMS_INT_ENABLE);
  	pms_dev_cmd(ioport, PMS_DEV_ENABLE);
+ 	pms_flush(ioport);
  
  	/* Successful open */
  	return(0);
***************
*** 230,238 ****
--- 240,251 ----
  	ioport = pmsaddr[unit];
  
  	/* Disable further mouse interrupts */
+ #if 0
  	pms_dev_cmd(ioport, PMS_DEV_DISABLE);
  	pms_pit_cmd(ioport, PMS_INT_DISABLE);
  	pms_aux_cmd(ioport, PMS_AUX_DISABLE);
+ #endif
+ 	pms_flush(ioport);
  
  	/* Complete the close */
  	sc->state &= ~OPEN;

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