>Responsible-Changed-From-To: freebsd-usb->cperciva
>Responsible-Changed-By: cperciva
>Responsible-Changed-When: Wed Nov 12 13:32:58 UTC 2008
>Responsible-Changed-Why: 
>Fixed in HEAD
>
>http://www.freebsd.org/cgi/query-pr.cgi?pr=128760

I've found some time to do more testing/debugging and it seems my
previous patch is wrong. This mouse needs an sc->sc_isize = 6 instead of
the usual 5.  Therefore the quirk entry in my original patch should be
removed and the attached patch (relative to RELENG_7_1) makes all
buttons/wheel/etc. work.

I'm not sure whether this is the best way to do this, please let me know
if there's a more structural way to deal with the specific
characteristics of this mouse.

Arjan
Index: ums.c
===================================================================
RCS file: /home/freebsd/CVS/src/sys/dev/usb/ums.c,v
retrieving revision 1.96.2.5.2.1
diff -u -r1.96.2.5.2.1 ums.c
--- ums.c       25 Nov 2008 02:59:29 -0000      1.96.2.5.2.1
+++ ums.c       25 Nov 2008 18:53:29 -0000
@@ -404,6 +404,29 @@
                sc->sc_loc_btn[2].pos = 2;
        }
 
+       /*
+        * The Microsoft Comfort Optical Mouse 3000 Model 1043 has a 4-way
+        * tilt wheel and 4 buttons. It reports size=2 and id=19 which seem
+        * bogus.
+        */
+       if (uaa->vendor == USB_VENDOR_MICROSOFT &&
+           uaa->product == USB_PRODUCT_MICROSOFT_COMFORT3000) {
+               sc->flags = UMS_T | UMS_Z;
+               sc->nbuttons = 4;
+               sc->sc_isize = 6;
+               sc->sc_iid = 0;
+               sc->sc_loc_x.pos = 16;
+               sc->sc_loc_y.pos = 24;
+               sc->sc_loc_z.pos = 32;
+               sc->sc_loc_t.pos = 40;
+               sc->sc_loc_t.size = 8;
+               sc->sc_loc_btn[0].pos = 8;
+               sc->sc_loc_btn[1].pos = 9;
+               sc->sc_loc_btn[2].pos = 10;
+               sc->sc_loc_btn[3].pos = 12;
+               sc->sc_loc_btn[3].size = 1;
+       }
+
        sc->sc_ibuf = malloc(sc->sc_isize, M_USB, M_NOWAIT);
        if (!sc->sc_ibuf) {
                printf("%s: no memory\n", device_get_nameunit(sc->sc_dev));
Index: usbdevs
===================================================================
RCS file: /home/freebsd/CVS/src/sys/dev/usb/usbdevs,v
retrieving revision 1.328.2.21.2.1
diff -u -r1.328.2.21.2.1 usbdevs
--- usbdevs     25 Nov 2008 02:59:29 -0000      1.328.2.21.2.1
+++ usbdevs     25 Nov 2008 18:53:29 -0000
@@ -1664,6 +1664,7 @@
 product MICROSOFT MN110                0x007a  10/100 USB NIC
 product MICROSOFT WLINTELLIMOUSE 0x008c        Wireless Optical IntelliMouse
 product MICROSOFT WLNOTEBOOK   0x00b9  Wireless Optical Mouse (Model 1023)
+product MICROSOFT COMFORT3000  0x00d1  Comfort Optical Mouse 3000 (Model 1043)
 product MICROSOFT WLNOTEBOOK2  0x00e1  Wireless Optical Mouse 3000 (Model 1056)
 product MICROSOFT WLNOTEBOOK3  0x00d2  Wireless Optical Mouse 3000 (Model 1049)
 product MICROSOFT WLUSBMOUSE   0x00b9  Wireless USB Mouse
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[email protected]"

Reply via email to