*BSD News Article 10528


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA258 ; Sun, 31 Jan 93 13:59:42 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!yale.edu!yale!mintaka.lcs.mit.edu!ai-lab!hal.gnu.ai.mit.edu!mycroft
From: mycroft@hal.gnu.ai.mit.edu (Charles Hannum)
Newsgroups: comp.unix.bsd
Subject: Re: Microsoft busmouse driver problems with patchkit-0.2
Date: 28 Jan 1993 22:11:58 GMT
Organization: /etc/organization
Lines: 87
Message-ID: <1k9lneINNo76@life.ai.mit.edu>
References: <1993Jan28.180807.24586@lgc.com>
NNTP-Posting-Host: hal.ai.mit.edu


In article <1993Jan28.180807.24586@lgc.com> danson@lgc.com (Doug Anson)
writes:
>
> has anyone else patched the microsoft busmouse driver for patchkit-0.2?
> any pointers on what I need to do to get it flying?

If you're using the driver from Rick Macklem of the University of Guelph,
the following patch should work.  (I don't know whether or not this
driver works with MS mice.)


*** mse.c.~1~	Thu Jan 28 04:29:31 1993
--- mse.c	Thu Jan 28 04:28:29 1993
***************
*** 51,57 ****
  struct mse_softc {
  	int	sc_flags;
  	int	sc_mousetype;
! 	struct proc *sc_selp;
  	u_int	sc_port;
  	void	(*sc_enablemouse)();
  	void	(*sc_disablemouse)();
--- 51,57 ----
  struct mse_softc {
  	int	sc_flags;
  	int	sc_mousetype;
! 	pid_t	sc_selp;
  	u_int	sc_port;
  	void	(*sc_enablemouse)();
  	void	(*sc_disablemouse)();
***************
*** 289,295 ****
  	 * Since this is an exclusive open device, any previous proc.
  	 * pointer is trash now, so we can just assign it.
  	 */
! 	sc->sc_selp = p;
  	splx(s);
  	return (0);
  }
--- 289,295 ----
  	 * Since this is an exclusive open device, any previous proc.
  	 * pointer is trash now, so we can just assign it.
  	 */
! 	sc->sc_selp = p->p_pid;
  	splx(s);
  	return (0);
  }
***************
*** 301,307 ****
  	int unit;
  {
  	register struct mse_softc *sc = &mse_sc[unit];
! 	struct proc *p;
  
  #ifdef DEBUG
  	static int mse_intrcnt = 0;
--- 301,307 ----
  	int unit;
  {
  	register struct mse_softc *sc = &mse_sc[unit];
! 	pid_t p;
  
  #ifdef DEBUG
  	static int mse_intrcnt = 0;
***************
*** 324,330 ****
  		}	
  		if (sc->sc_selp) {	
  			p = sc->sc_selp;	
! 			sc->sc_selp = (struct proc *)0;	
  			selwakeup(p, 0);	
  		}	
  	}
--- 324,330 ----
  		}	
  		if (sc->sc_selp) {	
  			p = sc->sc_selp;	
! 			sc->sc_selp = (pid_t)0;	
  			selwakeup(p, 0);	
  		}	
  	}

-- 
 \  /   Charles Hannum, mycroft@ai.mit.edu
 /\ \   PGP public key available on request.  MIME, AMS, NextMail accepted.
Scheme  White heterosexual atheist male (WHAM) pride!