diff options
author | yokota <yokota@FreeBSD.org> | 2000-12-01 05:26:24 +0000 |
---|---|---|
committer | yokota <yokota@FreeBSD.org> | 2000-12-01 05:26:24 +0000 |
commit | 89d31777080c7795612a7238f83ef7b413a4209d (patch) | |
tree | e7c86ff61580c97c18d12994025bfb652a2f260e /sys/isa/psm.c | |
parent | 042c77017bb57a06b9a452bcd27d57c352098035 (diff) | |
download | FreeBSD-src-89d31777080c7795612a7238f83ef7b413a4209d.zip FreeBSD-src-89d31777080c7795612a7238f83ef7b413a4209d.tar.gz |
- Add a hack for "psmintr: out of sync.." This is NOT a fix,
but a hack! Add `flags 0x8000' to the psm driver to enable it.
The psm driver will try to get out of out-of-sync situation
by disabling the mouse and immediately enable it again.
If you are seeing this out-of-sync problem because of an
incompetent(?!) KVM switch, this hack will NOT be good
for you. However, if you are occasionally seeing the
problem because of lost mouse interrupt, this might help.
Diffstat (limited to 'sys/isa/psm.c')
-rw-r--r-- | sys/isa/psm.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/isa/psm.c b/sys/isa/psm.c index 3884ba4..77fa521 100644 --- a/sys/isa/psm.c +++ b/sys/isa/psm.c @@ -176,10 +176,12 @@ devclass_t psm_devclass; #define PSM_CONFIG_IGNPORTERROR 0x1000 /* ignore error in aux port test */ #define PSM_CONFIG_HOOKRESUME 0x2000 /* hook the system resume event */ #define PSM_CONFIG_INITAFTERSUSPEND 0x4000 /* init the device at the resume event */ +#define PSM_CONFIG_SYNCHACK 0x8000 /* enable `out-of-sync' hack */ #define PSM_CONFIG_FLAGS (PSM_CONFIG_RESOLUTION \ | PSM_CONFIG_ACCEL \ | PSM_CONFIG_NOCHECKSYNC \ + | PSM_CONFIG_SYNCHACK \ | PSM_CONFIG_NOIDPROBE \ | PSM_CONFIG_NORESET \ | PSM_CONFIG_FORCETAP \ @@ -1900,6 +1902,15 @@ psmintr(void *arg) log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x).\n", c & sc->mode.syncmask[0], sc->mode.syncmask[1]); sc->inputbytes = 0; + if (sc->config & PSM_CONFIG_SYNCHACK) { + /* + * XXX: this is a grotesque hack to get us out of + * dreaded "out of sync" error. + */ + log(LOG_DEBUG, "psmintr: re-enable the mouse.\n"); + disable_aux_dev(sc->kbdc); + enable_aux_dev(sc->kbdc); + } continue; } |