mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
- 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.
This commit is contained in:
parent
ed584487bd
commit
872dfb2dd3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69439
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user