From 89d31777080c7795612a7238f83ef7b413a4209d Mon Sep 17 00:00:00 2001 From: yokota Date: Fri, 1 Dec 2000 05:26:24 +0000 Subject: - 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. --- sys/isa/psm.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sys/isa/psm.c') 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; } -- cgit v1.1