NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/50701: The MS Comfort Mouse 6000 reports wrong locator bytes



>Number:         50701
>Category:       kern
>Synopsis:       The MS Comfort Mouse 6000 reports wrong locator bytes
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 24 10:35:00 +0000 2016
>Originator:     Martijn van Buul
>Release:        NetBSD 7.0_STABLE
>Organization:
>Environment:
System: NetBSD tinkerbell 7.0_STABLE NetBSD 7.0_STABLE (GENERIC) #3: Sun Jan 24 10:33:49 CET 2016 root@tinkerbell:/usr/obj/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64

>Description:
The Microsoft Comfort Mouse 6000 reports the wrong location for the scroll wheel and the (unimplemented!) tilt control. The reported locations overlap with the X coordinate, resulting in spurious tilt- and scrollwheel events (and a nonfunctional scrollwheel), resulting in an almost unusable mouse.

The ums driver already contains a similar fix for other Microsoft mice (The Wireless Laser Mouse 6000, the number must be jinxed), but the correct location is different.

>How-To-Repeat:
Attach a Microsoft Comfort Mouse 6000, monitor the output (e.g. by starting an X server and running xev, or by reading the appropriate /dev/wsmouse? device), observe.

>Fix:
The following patch fixes the problem. This requires usbdevs.h and usbdevs_data.h to be regenerated; since they depend on the correct RCS tag I have omitted these.

As stated, ums.c already contains a very similar fix; however the *correct* locations are different; it seems that the wireless mouse has 8-bit indicators for X and Y, whereas the wired mouse has 16-bit indicators.
        
These fixes can probably combined into a universal fix by correcting z.pos to be "y.pos + y.size" rather than a constant, but since I don't own the "Wireless Mouse 6000" I cannot confirm that its y-axis is in fact at byte 2, which is why I opted to keep these fixes  separated.

Index: usbdevs.h
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs.h,v
retrieving revision 1.672.2.4
diff -u -r1.672.2.4 usbdevs.h
--- usbdevs.h   18 Oct 2015 09:03:22 -0000      1.672.2.4
+++ usbdevs.h   24 Jan 2016 10:27:20 -0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdevs.h,v 1.672.2.4 2015/10/18 09:03:22 martin Exp $ */
+/*     $NetBSD$        */

 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -2176,6 +2176,7 @@
 #define        USB_PRODUCT_MICROSOFT_XBOX_CONTROLLER_S12       0x0289          /* Xbox Controller S (1.2) */
 #define        USB_PRODUCT_MICROSOFT_24GHZ_XCVR10      0x071d          /* 2.4GHz Transceiver V1.0 */
 #define        USB_PRODUCT_MICROSOFT_24GHZ_XCVR20      0x071f          /* 2.4GHz Transceiver V2.0 */
+#define        USB_PRODUCT_MICROSOFT_CM6000    0x077d          /* Comfort Mouse 6000 */

 /* Microtech products */
 #define        USB_PRODUCT_MICROTECH_SCSIDB25  0x0004          /* USB-SCSI-DB25 */
Index: usbdevs_data.h
===================================================================
RCS file: /cvsroot/src/sys/dev/usb/usbdevs_data.h,v
retrieving revision 1.673.2.4
diff -u -r1.673.2.4 usbdevs_data.h
--- usbdevs_data.h      18 Oct 2015 09:03:22 -0000      1.673.2.4
+++ usbdevs_data.h      24 Jan 2016 10:27:20 -0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: usbdevs_data.h,v 1.673.2.4 2015/10/18 09:03:22 martin Exp $    */
+/*     $NetBSD$        */

 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
@@ -6751,6 +6751,10 @@
            "2.4GHz Transceiver V2.0",
        },
        {
+           USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_CM6000,
+           "Comfort Mouse 6000",
+       },
+       {
            USB_VENDOR_MICROTECH, USB_PRODUCT_MICROTECH_SCSIDB25,
            "USB-SCSI-DB25",
        },
@@ -10203,4 +10207,4 @@
            "Prestige",
        },
 };
-const int usb_nproducts = 2010;
+const int usb_nproducts = 2011;



Home | Main Index | Thread Index | Old Index