Date: Wed, 02 Jul 2003 15:27:22 -0400 (EDT) From: Mike Heffner <mheffner@vt.edu> To: freebsd-current@freebsd.org Subject: PSM patch to reset device twice Message-ID: <XFMail.20030702152722.mheffner@vt.edu>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
The attached patch will try to reset the mouse twice to try and wakeup
some KVMs/mice. Specifically, this helps detect some Intellimouse mice
through IOGear KVMs.
Reseting the mouse multiple times shouldn't cause problems, and the patch
makes the second reset non-fatal, however, please try the patch and report
if it causes any problems with detecting mice. I plan to commit the
patch this weekend unless there are problems with it.
Thanks,
Mike
--
Mike Heffner <mheffner@[acm.]vt.edu>
<mikeh@FreeBSD.org>
[-- Attachment #2 --]
Index: psm.c
===================================================================
RCS file: /cvs/ncvs/src/sys/isa/psm.c,v
retrieving revision 1.59
diff -u -r1.59 psm.c
--- psm.c 1 Jul 2003 14:41:16 -0000 1.59
+++ psm.c 2 Jul 2003 19:19:20 -0000
@@ -1040,6 +1040,10 @@
/*
* NOTE: some controllers appears to hang the `keyboard' when the aux
* port doesn't exist and `PSMC_RESET_DEV' is issued.
+ *
+ * Attempt to reset the controller twice -- this helps
+ * pierce through some KVM switches. The second reset
+ * is non-fatal.
*/
if (!reset_aux_dev(sc->kbdc)) {
recover_from_error(sc->kbdc);
@@ -1047,6 +1051,11 @@
if (verbose)
printf("psm%d: failed to reset the aux device.\n", unit);
endprobe(ENXIO);
+ } else if (!reset_aux_dev(sc->kbdc)) {
+ recover_from_error(sc->kbdc);
+ if (verbose >= 2)
+ printf("psm%d: failed to reset the aux device (2).\n",
+ unit);
}
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20030702152722.mheffner>
