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

From: Hellmuth Michaelis <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc:  
Subject: Re: usb/90162: [usb] [patch] Add support for the MS Wireless USB Mouse
Date: Sun, 24 Jun 2007 13:27:20 +0200

 Just for the archives,
 
 recently i bought another M$ notebook mouse, which looks exactly like the
 one mentioned in this PR (from the top, it looks different from the bottom,
 the wireless dongle is of another type) but behaves differently, the output
 of usbdevs -dv is:
 
   low speed, power 100 mA, config 1, Microsoft Wireless Optical Mouse=C2=AE=
  1.00(0x00e1), Microsoft(0x045e), rev 0.07
 
 =46ollowing is an updated patch to make both mice work with 6.2-STABLE:
 
 diff -ur usb-62S/ums.c usb/ums.c
 =2D-- usb-62S/ums.c    Sun Jan 21 03:27:30 2007
 +++ usb/ums.c  Sun Jun 24 12:44:41 2007
 @@ -188,8 +188,9 @@
        if (err)
                return (UMATCH_NONE);
 =20
 =2D    if (hid_is_collection(desc, size,
 =2D                          HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)))
 +       if (id->bInterfaceClass =3D=3D UICLASS_HID &&
 +           id->bInterfaceSubClass =3D=3D UISUBCLASS_BOOT &&
 +           id->bInterfaceProtocol =3D=3D UIPROTO_MOUSE)
                ret =3D UMATCH_IFACECLASS;
        else
                ret =3D UMATCH_NONE;
 @@ -320,6 +321,30 @@
                USB_ATTACH_ERROR_RETURN;
        }
 =20
 +       /*
 +        * The Microsoft Wireless Notebook Optical Mouse seems to be in wor=
 se
 +        * shape than the Wireless Intellimouse 2.0, as its X, Y, wheel, an=
 d all
 +        * of its other button positions are all off. It also reports that =
 it
 +        * has two addional buttons and a tilt wheel.
 +        */
 +       if (uaa->vendor =3D=3D USB_VENDOR_MICROSOFT &&
 +               (uaa->product =3D=3D USB_PRODUCT_MICROSOFT_WLUSBMOUSE ||
 +                uaa->product =3D=3D USB_PRODUCT_MICROSOFT_WLUSBMOUSE3)) {
 +               sc->flags =3D UMS_Z;
 +               sc->flags |=3D UMS_SPUR_BUT_UP;
 +               sc->nbuttons =3D 3;
 +               sc->sc_isize =3D 5;
 +               sc->sc_iid =3D 0;
 +
 +       /* 1st byte of descriptor report contains garbage for this mouse */
 +               sc->sc_loc_x.pos =3D 16;
 +               sc->sc_loc_y.pos =3D 24;
 +               sc->sc_loc_z.pos =3D 32;
 +               sc->sc_loc_btn[0].pos =3D 8;
 +               sc->sc_loc_btn[1].pos =3D 9;
 +               sc->sc_loc_btn[2].pos =3D 10;
 +       }
 +
        sc->sc_ep_addr =3D ed->bEndpointAddress;
        sc->sc_disconnected =3D 0;
        free(desc, M_TEMP);
 @@ -458,12 +483,20 @@
         * This should sort that.
         * Currently it's the only user of UMS_T so use it as an identifier.
         * We probably should switch to some more official quirk.
 +        *
 +        * UPDATE: This problem affects the M$ Wireless Notebook Optical Mo=
 use,
 +        * too. However, the leading byte for this mouse is normally 0x11,
 +        * and the phantom mouse click occurs when its 0x14.
         */
        if (sc->flags & UMS_T) {
                if (sc->sc_iid) {
                        if (*ibuf++ =3D=3D 0x02)
                                return;
                }
 +       } else if (sc->flags & UMS_SPUR_BUT_UP) {
 +               DPRINTFN(5, ("ums_intr: #### ibuf[0] =3D %d ####\n", *ibuf)=
 );
 +               if (*ibuf =3D=3D 0x14 || *ibuf =3D=3D 0x15)
 +                       return;
        } else {
                if (sc->sc_iid) {
                        if (*ibuf++ !=3D sc->sc_iid)
 Only in usb: ums.c.orig
 diff -ur usb-62S/usb.h usb/usb.h
 =2D-- usb-62S/usb.h    Fri Jan 20 23:47:49 2006
 +++ usb/usb.h  Fri Jun 22 10:11:19 2007
 @@ -426,6 +426,7 @@
  #define UICLASS_HID           0x03
  #define  UISUBCLASS_BOOT      1
  #define  UIPROTO_BOOT_KEYBOARD        1
 +#define  UIPROTO_MOUSE                2
 =20
  #define UICLASS_PHYSICAL      0x05
 =20
 Only in usb: usb.h.orig
 Only in usb: usb.h.rej
 diff -ur usb-62S/usbdevs usb/usbdevs
 =2D-- usb-62S/usbdevs  Wed Feb 14 20:57:15 2007
 +++ usb/usbdevs        Sun Jun 24 12:21:52 2007
 @@ -1260,6 +1260,8 @@
  product MICROSOFT INTELLIEYE  0x0025  IntelliEye mouse
  product MICROSOFT INETPRO2    0x002b  Internet Keyboard Pro
  product MICROSOFT MN110               0x007a  10/100 USB NIC
 +product MICROSOFT WLUSBMOUSE  0x00b9  Wireless Notebook Optical Mouse (Model=
  1023)
 +product MICROSOFT WLUSBMOUSE3 0x00e1  Wireless Notebook Optical Mouse 3000 =
 (Model 1056)
 =20
  /* Microtech products */
  product MICROTECH SCSIDB25    0x0004  USB-SCSI-DB25
 
 hellmuth
 =2D-=20
 Hellmuth Michaelis          HM1-RIPE           mobil +49 (0)160 / 96 45 56 =
 96
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to