freebsd-skq/sys/isa
alfred 618cf169ed Significantly reduce the "jitter" that is typical for PS/2 mice
when using a KVM.

There is no actual solution possible, but this gets us pretty close.

Typically when switching back to a FreeBSD box and moving the mouse
wild data is produced, because the protocol's validation/checksum
system is extremely weak it is impossible to determine that we're
out of sync before dropping several bogus packets to user land.

The actual solution that appears to offer the best clamping of
jitter is to buffer the mouse packets if we've not seen mouse
activity for more than .5 seconds.  Then waiting to flush that data
for 1/20th of a second.  If within that 20th of a second we get any
packets that do fail the weak test we drop the entire queue and
back off accepting data from the mouse for 2 seconds and then repeat
the whole deal.

You can still get _some_ jitter, notably if you switch to the FreeBSD
box, then move the mouse just enough to generate one or two packets.
Those packets may be bogus, but may still pass the validity check.

One way to finally kill the problem once and for all is to check
the initial packets for "wild" values.  Typically one sees packets
in the +/-60 range during normal operation, however when bogus data
is generated it's typically near the outer range of +/-120 or more,
those packets would be a good candidate for dropping or clamping.

I've been running with this for several weeks now and it has
significantly helped me stay sane even with a piece of junk Belkin
KVM causing wild jitter each and every time I switch.

Lastly I'd like to note that my experience with Windows shows me that
somehow the Microsoft PS/2 driver typically avoids this problem, but
that may only be possible when running the mouse in a dumb-ed down PS/2
mode that Belkin recommends on their site.
2003-12-11 11:28:11 +00:00
..
atkbd_isa.c Use __FBSDID(). 2003-06-11 00:34:37 +00:00
atkbdc_isa.c - Use the new resource_disabled() helper function to see if devices are 2003-07-02 16:09:02 +00:00
atrtc.c Don't disable the TSC with statclock_disable. 2003-11-13 10:02:12 +00:00
fd.c Look at the equipment list for amd64 as well as i386 for autodetecting 2003-10-23 05:52:52 +00:00
fdreg.h
isa_common.c - Make the isab devclass global to allow for multiple ISA bridge drivers. 2003-07-08 18:56:58 +00:00
isa_common.h No need to declare M_ISADEV here. 2002-10-16 10:38:48 +00:00
isa_if.m
isahint.c - Use the new resource_disabled() helper function to see if devices are 2003-07-02 16:09:02 +00:00
isareg.h Clean up some antique stuff. We do not support Weitek FPUs etc, and never 2003-09-05 14:54:26 +00:00
isavar.h - Make the isab devclass global to allow for multiple ISA bridge drivers. 2003-07-08 18:56:58 +00:00
orm.c Use __FBSDID(). 2003-06-11 00:34:37 +00:00
pnp.c Use __FBSDID(). 2003-06-11 00:34:37 +00:00
pnpparse.c Use __FBSDID(). 2003-06-11 00:34:37 +00:00
pnpreg.h
pnpvar.h
psm.c Significantly reduce the "jitter" that is typical for PS/2 mice 2003-12-11 11:28:11 +00:00
rtc.h
syscons_isa.c Fix a panic that occurs when resuming. For some reason, sc->cur_scp is 2003-10-29 20:48:13 +00:00
vga_isa.c Change fb_attach() and fb_detach() to take a integer unit number rather 2003-09-26 10:41:44 +00:00