FreeBSD Bugzilla – Attachment 35454 Details for
Bug 57230
[psm] [patch] psm(4) incorrectly identifies an IntelliMouse Explorer attached through an Avocent SwitchView KVM
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
intellimouse.patch
intellimouse.patch (text/plain), 3.38 KB, created by
Tom Convery
on 2003-09-26 04:20:18 UTC
(
hide
)
Description:
intellimouse.patch
Filename:
MIME Type:
Creator:
Tom Convery
Created:
2003-09-26 04:20:18 UTC
Size:
3.38 KB
patch
obsolete
>--- src/sys/isa/psm.c.orig Sat Jul 12 14:36:04 2003 >+++ src/sys/isa/psm.c Thu Sep 25 12:49:55 2003 >@@ -751,6 +751,28 @@ > } > } > >+ /* >+ * The Avocent SwitchView KVM appears to force an Intellimouse Explorer >+ * to revert to plain Intellimouse protocol whenever the device is >+ * disabled. This hack checks to see if we previously detected an Explorer, >+ * and tests if the device is now reporting a different ID. If this is the >+ * case, we try to re-enable Explorer functionality. >+ */ >+ if ((sc->hw.hwid == PSM_EXPLORER_ID) && >+ (get_aux_id(sc->kbdc) != PSM_EXPLORER_ID)) { >+ log(LOG_DEBUG, "psm%d: Intellimouse Explorer reverted to lower " >+ "protocol.\n", sc->unit); >+ enable_msexplorer(sc); >+ if (get_aux_id(sc->kbdc) == PSM_EXPLORER_ID) >+ log(LOG_DEBUG, "psm%d: Restored Intellimouse Explorer protocol.\n", >+ sc->unit); >+ else >+ log(LOG_DEBUG, "psm%d: Could not restore Intellimouse Explorer " >+ " protocol.\n", sc->unit); >+ /* We shouldn't get here unless someone switched mice out from >+ * underneath us. How and/or should we deal with this? */ >+ } >+ > if (get_mouse_status(sc->kbdc, stat, 0, 3) < 3) > log(LOG_DEBUG, "psm%d: failed to get status (doopen).\n", sc->unit); > >@@ -2647,18 +2669,38 @@ > static int > enable_msexplorer(struct psm_softc *sc) > { >+ /* IntelliMouse initialization sequence */ > static unsigned char rate0[] = { 200, 100, 80, }; >+ /* IntelliMouse Explorer initialization sequence */ > static unsigned char rate1[] = { 200, 200, 80, }; > KBDC kbdc = sc->kbdc; > int id; > int i; > >- /* the special sequence to enable the extra buttons and the roller. */ >+ /* >+ * According to Microsoft's documentation for the IntelliMouse Explorer, >+ * full functionality is activated by first sending the IntelliMouse >+ * initialization sequence, then sending the Explorer initialization >+ * sequence. >+ * Reference: http://www.microsoft.com/whdc/hwdev/tech/input/5b_wheel.mspx >+ */ >+ >+ /* First send the IntelliMouse init sequence */ >+ for (i = 0; i < sizeof(rate0)/sizeof(rate0[0]); ++i) { >+ if (set_mouse_sampling_rate(kbdc, rate0[i]) != rate0[i]) >+ return FALSE; >+ } >+ /* If we've got an Explorer, it will claim to be an IntelliMouse here */ >+ id = get_aux_id(kbdc); >+ if (id != PSM_INTELLI_ID) >+ return FALSE; >+ >+ /* Now send the Explorer init sequence */ > for (i = 0; i < sizeof(rate1)/sizeof(rate1[0]); ++i) { > if (set_mouse_sampling_rate(kbdc, rate1[i]) != rate1[i]) > return FALSE; > } >- /* the device will give the genuine ID only after the above sequence */ >+ /* If we've got an Explorer, now it will identify itself */ > id = get_aux_id(kbdc); > if (id != PSM_EXPLORER_ID) > return FALSE; >@@ -2676,11 +2718,18 @@ > * sequence; it will make the KVM think the mouse is IntelliMouse > * when it is in fact IntelliMouse Explorer. > */ >+ >+#if 0 >+ /* >+ * This breaks IntelliMouse Explorer support with the Avocent >+ * SwitchView, which DOES actually understand the Explorer protocol. >+ */ > for (i = 0; i < sizeof(rate0)/sizeof(rate0[0]); ++i) { > if (set_mouse_sampling_rate(kbdc, rate0[i]) != rate0[i]) > break; > } > id = get_aux_id(kbdc); >+#endif > > return TRUE; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 57230
: 35454 |
35455