Subject: Re: ps/2 mouse timeout problems
To: David Laight <david@l8s.co.uk>
From: Martin Husemann <martin@duskware.de>
List: tech-kern
Date: 08/30/2002 20:25:57
> yes - mono_time is fine, and really shouldn't go backwards
> (except that you need to disable the clock interrupt while
> you fetch it....)
Well, theoretically yes. I'm not sure it is realy needed here.
Many places in the kernel that do not care if they get the current
or the previous result do it without protection.
> You don't need to calculate max_delay each time, indeed
> 25000 + 1000000/hz is needed to guarantee 25ms.
I'm not sure whether 'hz' can change during kernel runtime - if not a
global value initialized at attach time would do.
> I'm sure you'd get away with a constant 50ms (or even 100ms).
The whole idea is to detect a KVM switched away/back to the port as soon
as possible (at least IIRC the original intention of the changes).
I have no idea if such switches are inteligent devices and snoop the mouse
protocol, or are just plain dump and leave the pms driver in inputstate != 0
until the KVM is switched back. In the latter case every threshold > the
maximum delay during normal operation will do.
I just wanted a minimal change - you know, all hell broke loose when last time
someone did major changes in this area ;-)
Martin