Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 1995 09:34:18 -0500 (CDT)
From:      "Lars Fredriksen" <fredriks@mcs.com>
To:        freebsd-current@freebsd.org
Subject:   Re: PS2 mouse does not work 
Message-ID:  <m0sgYgc-0003l3C@mercury.mcs.com>

next in thread | raw e-mail | index | archive | help
Robert Minnear writes:
> 
> > Steve Schwarz writes:
> > > 
> > > I have plugged a PS2 mouse into the PS2 port of my Gateway 2000
> > > DX4/100 (called Liberty) laptop.  Running FreeBSD 2.0.5, I added
> > > device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr
> > > [stuff deleted]
> >
> > There seems to be a problem with how some hardware vendors implemented
> > the IRQ stuff. Basically it seems that disabling the IRQ from the mouse
> > also disables the keyboard one. I posted a patch here earlier that seemed
> > to fix the problem on NCR machines anyway. I'll see if I can't find it 
> > somewhere if you want it.
> 
> I would also like a copy of this of this patch if you're not going
> to post it to this list.  Thanks.
> 
> 

Here is the HACK!:
*** psm.c.orig  Thu Jun  1 05:13:44 1995
--- psm.c       Mon Jul 10 12:05:50 1995
***************
*** 192,197 ****
--- 192,200 ----
        psm_poll_status();
        outb(ioport+CNTRL, PSM_DISABLE);
        psm_command(ioport, PSM_INT_DISABLE);
+ #if defined(NCR3333)
+       psm_command(ioport, PSM_INT_ENABLE);
+ #endif
  
        /* Setup initial state */


Note that the above is a X cut/paste job so there are probaly space/tab 
differences with the file.

Also, I sent the disclaimer below out last time, and I do it again now
just because I feel the real fix is somewhat different. If enough people
get their keyboard working with the above hack, and there are no other 
side effects, then probably we should commit it.

DISCLAIMER:
It seems that on some machine, disabling the interrupt for the mouse
also disables the interrupt for the keyboard. I tried to use command 0x20
to read the current state of the command register, but on the NCR machine
anyway, that doesn't work right. Anyway enable the NCR3333 option and try
it. It cured my problem, but I don't know if this should be in the CVS
tree as it is very much a HACK. Also note that just commenting out the
disabling of the mouse interrrupt didn't help either. I hacked a the 
probe and the attach routine to just return success and not to mess with
the AUX port, but that didn't help either. So I haven't figured out yet
how the psm driver manages to mess up the keyboard. 



-- 
-------------------------------------------------------------------
Lars Fredriksen		fredriks@mcs.com		(home)
			lars@fredriks.pr.mcs.net	(home-home)
			fredriks@asiago.cs.wisc.edu




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0sgYgc-0003l3C>