NetBSD-Bugs archive

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

Re: kern/44980: Z-axis not working for Microsoft Comfort Mouse 6000 (includes fix)



The following reply was made to PR kern/44980; it has been noted by GNATS.

From: Martijn van Buul <martijn.van.buul%gmail.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: kern/44980: Z-axis not working for Microsoft Comfort Mouse 6000
 (includes fix)
Date: Wed, 18 May 2011 08:26:21 +0200

 On 18 May 2011 00:05, Julian Fagir <gnrp%komkon2.de@localhost> wrote:
 > =A0this problem is similar to the one I had with the Microsoft Natural Wi=
 reless
 > =A06000, see misc/44634. There seem to be more mice like that, or is it o=
 nly the
 > =A06000-series of Microsoft?
 >
 > =A0Regards, Julian
 
 Possibly.
 
 After submitting this bug I realised that my wife carries a small
 wireless Microsoft mouse in her laptop bag, and lo and behold: It
 suffers from the same problem, even though it doesn't carry the "6000"
 name: it's a "wireless notebook optical mouse 3000", but uses the same
 vendor- and product id as your mouse. While I haven't tested it yet,
 i'm sure the fix would've worked.
 
 So yes, maybe there *is* something wrong with recent Microsoft mice,
 and it's not just incidental. The difference between my "Comfort Mouse
 6000" and the others seems to be the width of the X- and Y- axis. On
 the "Wireless optical mouse" it's 8 bits, on the "Comfort mouse 6000"
 it's 16 bits - but in both cases the correct location of the Z axis
 would be "directly following the Y axis". I rewrote the existing patch
 to reflect this; instead of using a fixed location it uses the data
 for the Y channel to calculate the right position. (see below, this
 patch makes both my mice work)
 
 It would be nice if these mice could be identified in a different way
 besides their vendor/product ID. There might be more.
 
 Index: ums.c
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/sys/dev/usb/ums.c,v
 retrieving revision 1.81
 diff -u -r1.81 ums.c
 --- ums.c      3 Nov 2010 22:34:24 -0000       1.81
 +++ ums.c      18 May 2011 06:25:40 -0000
 @@ -282,15 +282,19 @@
        }
 
        /*
 -       * The Microsoft Wireless Laser Mouse 6000 v2.0 reports a bad
 -       * position for the wheel and wheel tilt controls -- should be
 -       * in bytes 3 & 4 of the report.  Fix this if necessary.
 +       * Several Microsoft mice report a bad position for the wheel
 +       * and tilt controls -- depending on the size of the X- and Y-
 +       * control it should either be in bytes 3&4 or 5&6. Fix this
 +       * if necessary.
         */
        if (uha->uaa->vendor =3D=3D USB_VENDOR_MICROSOFT &&
            (uha->uaa->product =3D=3D USB_PRODUCT_MICROSOFT_24GHZ_XCVR10 ||
 -           uha->uaa->product =3D=3D USB_PRODUCT_MICROSOFT_24GHZ_XCVR20)) {=09
 +           uha->uaa->product =3D=3D USB_PRODUCT_MICROSOFT_24GHZ_XCVR20 ||
 +           uha->uaa->product =3D=3D 0x077d ||
 +           uha->uaa->product =3D=3D 0x00e1)) {=09
                if ((sc->flags & UMS_Z) && sc->sc_loc_z.pos =3D=3D 0)
 -                      sc->sc_loc_z.pos =3D 24;
 +                      sc->sc_loc_z.pos =3D sc->sc_loc_y.pos +
 +                          sc->sc_loc_y.size;
                if ((sc->flags & UMS_W) && sc->sc_loc_w.pos =3D=3D 0)
                        sc->sc_loc_w.pos =3D sc->sc_loc_z.pos + 8;
        }
 


Home | Main Index | Thread Index | Old Index