freebsd-dev/sys/dev
Alfred Perlstein de75fd6d2b 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
..
aac Temporary workaround for aac_cam to deal with CAM requiring Giant. This 2003-12-03 15:42:12 +00:00
acpica Trim trailing whitespace. 2003-12-10 19:10:27 +00:00
adlink The present defaults for the open and close for device drivers which 2003-09-27 12:01:01 +00:00
advansys Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
agp - Disable AGP on ALI chipsets if aperture size is 0. 2003-11-11 21:49:18 +00:00
aha Save the device so we can do a device_printf. 2003-11-13 04:14:53 +00:00
ahb Make this at least compile on 64 bit platforms. Its been breaking 2003-07-30 20:09:22 +00:00
aic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
aic7xxx Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
amd Prefer new location of pci include files (which have only been in the 2003-08-22 05:54:52 +00:00
amr crashdump support. 2003-10-10 22:49:40 +00:00
an Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
ar Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
asr Remove code previously under #ifdef ASR_VERY_BROKEN 2003-09-26 15:56:42 +00:00
ata Finetune last commit, we need to take care of empty channels. 2003-12-10 23:06:24 +00:00
ath o track API change for HAL v0.9.6.1 2003-11-29 01:23:59 +00:00
atkbdc Significantly reduce the "jitter" that is typical for PS/2 mice 2003-12-11 11:28:11 +00:00
awi Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
bfe Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
bge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
bktr Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr 2003-12-08 07:59:18 +00:00
buslogic Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
cardbus Make the cardbus driver a derived class of the pci driver. In theory, this 2003-11-01 12:45:03 +00:00
ciss Correct the READ/WRITE CDB direction definition. 2003-12-08 23:12:57 +00:00
cm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cnw Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
cs o Add sysctl to allow ignoring checksum of eeprom. 2003-11-04 02:59:57 +00:00
ct Use __FBSDID(). 2003-08-24 17:55:58 +00:00
cx Updated cx driver commit part 1: bring in the new kernel driver. 2003-12-03 07:29:38 +00:00
cy Fixed some minor indentation bugs. 2003-12-02 12:47:08 +00:00
dc Add support for ELECOM/Laneed CardBus FastEtherner Card(LD-CBL/TXA) 2003-12-06 02:29:31 +00:00
dcons Move post dmamap_load processes into the callback function. 2003-11-08 16:26:22 +00:00
de Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
dec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
digi Eliminate bogus use of makedev(): rather than synthesize the dev_t, use 2003-09-26 09:05:57 +00:00
dpt Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
drm Update from DRI CVS. Includes locking fixes (including PR 59202), changes for 2003-11-12 20:56:30 +00:00
ed Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
eisa Use __FBSDID(). 2003-08-24 17:55:58 +00:00
em Don't call em_stop() from the watchdog since it requires the controller 2003-12-07 06:50:04 +00:00
en Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ep MFp4: 2003-11-02 20:13:39 +00:00
ex Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
exca Card type stuff was backwards, so assume io for the moment. mem needs 2003-10-07 04:29:04 +00:00
fatm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
fb Fix a typo. Allow for the creator not being stdout. 2003-11-11 07:34:08 +00:00
fdc Look at the equipment list for amd64 as well as i386 for autodetecting 2003-10-23 05:52:52 +00:00
fe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
firewire MFp4: 2003-12-11 03:42:40 +00:00
fxp Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
gem Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
gfb Change fb_attach() and fb_detach() to take a integer unit number rather 2003-09-26 10:41:44 +00:00
gx Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
harp Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
hatm Make the driver conditionally MPSAFE. MPSAFEty defaults to not-mpsafe 2003-11-05 11:47:31 +00:00
hfa Use __FBSDID(). 2003-08-24 17:55:58 +00:00
hifn Add symmetric crypto support for the 7955 and 7956. 2003-10-08 20:25:47 +00:00
hme Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ic Added definitions of most of the interesting 16950 register numbers 2003-09-16 14:21:17 +00:00
ichsmb Update the comment to indicate ICH5 support 2003-08-31 19:23:00 +00:00
ida Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
idt Gross kludge: 2003-11-16 22:33:42 +00:00
ie Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
iicbus Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
iir Update email addresses, copyrights, and tweak the management interface. 2003-09-26 15:36:47 +00:00
ips ServeRaid (at least 5i) didn't initialize correctly. To get 2003-11-27 08:37:36 +00:00
isp fix broken _IOR usage 2003-11-14 05:13:00 +00:00
ispfw Use __FBSDID(). 2003-08-24 17:55:58 +00:00
joy Use __FBSDID(). 2003-08-24 17:55:58 +00:00
kbd - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
led Correct usage of mtx_init() API. This is not a functional change since 2003-12-07 23:21:22 +00:00
lge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
lnc Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
matcd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
mc146818
mca Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mcd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
md Use the class->init() to hitch up preload devices, rather than rely on 2003-11-18 18:19:26 +00:00
mii Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
mk48txx Use __FBSDID(). 2003-08-24 17:55:58 +00:00
mlx Prepare for locking mlx(4) by cleaning up the use of busdma. No real 2003-09-02 08:30:31 +00:00
mly Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
mpt Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
mse - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
musycc Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
my Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
ncv Const poison string accessor functions. 2003-10-26 00:51:40 +00:00
nge Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
nmdm - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
nsp Use __FBSDID(). 2003-08-24 17:55:58 +00:00
null Shorten the code by removing one "do-nothing" function, replacing it 2003-11-01 09:31:54 +00:00
ofw Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
owi Nursemaid: Fix compilation. 2003-12-10 15:09:38 +00:00
patm Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
pccard Use %#jx for both args. 2003-11-04 06:30:59 +00:00
pccbb Fix a harmless typo (use of res instead of rle: if rle is NULL, we'd 2003-11-12 05:21:06 +00:00
pcf fix another LP64 problem. READ_IVAR takes a pointer to an uintptr_t, not 2003-06-20 07:22:54 +00:00
pci Initial landing of SMP support for FreeBSD/amd64. 2003-11-17 08:58:16 +00:00
pcic Use __FBSDID(). 2003-08-24 17:55:58 +00:00
pdq Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ppbus Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
ppc Forgot an added file in the last commit. 2003-08-01 05:02:55 +00:00
pst Dont re-arm the timeout twice on a timeout error. 2003-09-08 06:28:50 +00:00
puc Add support for Moxa Technologies' Smartio CP-104UL/PCI 4S RS232 card. 2003-12-09 17:31:25 +00:00
raidframe Use bio_offset instead of bio_blkno 2003-10-18 17:26:13 +00:00
random Fix a major faux pas of mine. I was causing 2 very bad things to 2003-11-20 15:35:48 +00:00
ray Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
rc Consistently use the BSD u_int and u_short instead of the SYSV uint and 2003-08-07 15:04:27 +00:00
re Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
rndtest Use __FBSDID(). 2003-08-24 17:55:58 +00:00
rp Use __FBSDID(). 2003-08-24 17:55:58 +00:00
sab - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
safe Prefer new location of pci include files (which have only been in the 2003-08-22 07:08:17 +00:00
sbni Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
sbsh Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
scd Discontinue bio_blkno, use bio_offset instead. 2003-10-18 17:44:01 +00:00
sf Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
si Use __FBSDID(). 2003-08-24 18:03:45 +00:00
sio Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
sk Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
smbus No need for a separate nfpm driver now - amdpm handles both. 2003-09-06 13:58:06 +00:00
sn Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
snc Do if_xname conversion. I missed this one because it's pc98 only. 2003-11-01 23:24:38 +00:00
snp - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00
sound The last argument to mtx_init() should be MTX_DEF, not 0. This is not a 2003-12-08 01:08:03 +00:00
speaker Use __FBSDID(). 2003-06-02 16:32:55 +00:00
sr Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
stg Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
streams falloc allocates a file structure and adds it to the file descriptor 2003-10-19 20:41:07 +00:00
sym unifdef old interface support out to prevent false positives. 2003-12-07 05:17:13 +00:00
syscons Fix a panic that occurs when resuming. For some reason, sc->cur_scp is 2003-10-29 20:48:13 +00:00
tdfx Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
tga Use __FBSDID(). 2003-08-24 17:55:58 +00:00
ti Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
trm Use PCIR_BAR(x) instead of PCIR_MAPS. 2003-09-02 17:30:40 +00:00
twe After extensive QA cycles at 3ware, bring the driver in-line with all the 2003-12-02 07:57:20 +00:00
tx Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
txp Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
uart Sometimes cardbus attachments don't attach, so while we track down 2003-11-28 05:28:29 +00:00
ubsec Use __FBSDID(). 2003-08-24 17:55:58 +00:00
usb Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
utopia Generate events when the carrier goes up or down. 2003-07-30 08:35:58 +00:00
vinum Initalize buffer headers correctly for current version of bio subsystem. 2003-11-24 04:06:56 +00:00
vr Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
vx Replace the if_name and if_unit members of struct ifnet with new members 2003-10-31 18:32:15 +00:00
wds Use __FBSDID(). 2003-08-24 17:55:58 +00:00
wi Older versions of the intersil firmware is a lot slower than newer 2003-12-09 07:41:07 +00:00
wl Drop the driver lock around calls to if_input to avoid a LOR when 2003-11-14 19:00:32 +00:00
xe Don't use caddr_t in mchash(). Also use C99 spellings over BSD ones. 2003-12-08 07:54:15 +00:00
zs - Implement selwakeuppri() which allows raising the priority of a 2003-11-09 09:17:26 +00:00