Kazutaka YOKOTA writes:
> Anyway, I am now considering the following experiment.
> - We make the psm driver count the number of the "out-of-sync" errors.
> - When the error is detected for the first time, the psm driver will
> throw few data bytes (up to entire packet size) and see if it can
> get back to sync.
> - If the error still persists, the psm driver disable/enable the mouse
> and see if it works.
> - If the error still persists and the count goes up to N (10 or 20?),
> the psm driver reset and reinitialize the mouse. The counter
> is reset to zero.
> Too complicated?
It sounds fine to me. I was thinking that if you are truly concerned
about the amount of time that the disable/enable calls take, the way to
solve that is a combination of counter and timer. Increment a counter
when you take the disable/enable path to prevent recursive calls. Set a
timer the first time through the pair of functions to get the basic
timing down. Then, limit the calls to the pair of functions so that you
never call them closer than 10x the time to complete the pair. (maybe
100x the time is better? It depends on how long the function pair
actually takes to complete. Is it variable depending on MB or other
factors?) I think that timing the calls is important to limit the
possibility of calling the functions too often in case of pathological
circumstances. This seems to be the overriding concern anyway. I have
only seen the problem once since I enabled that flag.
What happens if you set your KVM into cyclical mode? Does it force a
mouse interrupt when it switches from machine to machine? I can imagine
a KVM misbehaving during the automatic rotate mode to cause a real
cascade of problems. On the other hand, if you put it in the rotate
mode, you probably aren't touching the mouse, so it shouldn't cause
How difficult is it to keep some sort of timer value in the code? If it
costs too much to get a timer, then a counter is probably sufficient.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message