Subject: ps/2 mouse timeout problems
To: None <tech-kern@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 08/30/2002 00:20:44
some thought from the walk down the PH [1]

There were some recent 'fixes' to the ps/2 mouse driver to detect
protocol timeouts and to autodetect different mouse protocols.
IIRC these were not 100% effective :-)

The ps/2 driver seems to call microtime() (possibly unknowingly)
in order to (I presume) timestamp the arrival of bytes.

Now the standard microtime() routine will always enable
interrupts on exit (even if disabled on entry), it is definitely
called with interrupts disabled from somewhere.  If this is the
ps/2 mouse code it will cause confusion there.

It is also worth noting that (on x86) microtime() is a particularly
expensive routine (about 4us at best), so using the callout
functions is significantly better (they are optimised for short
timers, even when cancelled).

	David

-- 
David Laight: david@l8s.co.uk