Index: uhidev.c =================================================================== RCS file: /cvs/src/sys/dev/usb/uhidev.c,v retrieving revision 1.37 diff -u -r1.37 uhidev.c --- uhidev.c 23 Nov 2009 19:26:54 -0000 1.37 +++ uhidev.c 20 Mar 2010 13:14:26 -0000 @@ -119,7 +119,7 @@ usb_endpoint_descriptor_t *ed; struct uhidev_attach_arg uha; struct uhidev *dev; - int size, nrepid, repid, repsz; + int maxinpktsize, size, nrepid, repid, repsz; int repsizes[256]; int i; void *desc; @@ -139,6 +139,7 @@ (void)usbd_set_protocol(iface, 1); #endif + maxinpktsize = 0; sc->sc_iep_addr = sc->sc_oep_addr = -1; for (i = 0; i < id->bNumEndpoints; i++) { ed = usbd_interface2endpoint_descriptor(iface, i); @@ -160,6 +161,7 @@ if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN && (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { + maxinpktsize = UGETW(ed->wMaxPacketSize); sc->sc_iep_addr = ed->bEndpointAddress; } else if (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_OUT && (ed->bmAttributes & UE_XFERTYPE) == UE_INTERRUPT) { @@ -243,9 +245,11 @@ printf("%s: no memory\n", sc->sc_dev.dv_xname); return; } - sc->sc_nrepid = nrepid; - sc->sc_isize = 0; + /* Just request max packet size for the interrupt pipe */ + sc->sc_isize = maxinpktsize; + sc->sc_nrepid = nrepid; + usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev); @@ -253,13 +257,9 @@ repsz = hid_report_size(desc, size, hid_input, repid); DPRINTF(("uhidev_match: repid=%d, repsz=%d\n", repid, repsz)); repsizes[repid] = repsz; - if (repsz > 0) { - if (repsz > sc->sc_isize) - sc->sc_isize = repsz; - } } - sc->sc_isize += nrepid != 1; /* space for report ID */ - DPRINTF(("uhidev_attach: isize=%d\n", sc->sc_isize)); + + DPRINTF(("uhidev_attach: isize=%d\n", sc->sc_isize)); uha.parent = sc; for (repid = 0; repid < nrepid; repid++) { Index: ums.c =================================================================== RCS file: /cvs/src/sys/dev/usb/ums.c,v retrieving revision 1.31 diff -u -r1.31 ums.c --- ums.c 13 Oct 2009 19:33:19 -0000 1.31 +++ ums.c 20 Mar 2010 13:14:26 -0000 @@ -312,6 +312,17 @@ sc->sc_loc_btn[2].pos = 2; } + if (uha->uaa->vendor == USB_VENDOR_MICROSOFT && + ((uha->uaa->product == USB_PRODUCT_MICROSOFT_24GHZ_XCVR10) || + (uha->uaa->product == USB_PRODUCT_MICROSOFT_24GHZ_XCVR20) || + (uha->uaa->product == USB_PRODUCT_MICROSOFT_24GHZ_XCVR50))) { + if ((sc->flags & UMS_Z) && sc->sc_loc_z.pos == 0) + sc->sc_loc_z.pos = 24; + if ((sc->flags & UMS_W) && sc->sc_loc_w.pos == 0) + sc->sc_loc_w.pos = sc->sc_loc_z.pos + 8; + } + + printf(": %d button%s", sc->nbuttons, sc->nbuttons <= 1 ? "" : "s"); switch (sc->flags & (UMS_Z | UMS_W)) { Index: usbdevs =================================================================== RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.480 diff -u -r1.480 usbdevs --- usbdevs 14 Mar 2010 22:44:56 -0000 1.480 +++ usbdevs 20 Mar 2010 13:14:27 -0000 @@ -2550,6 +2550,10 @@ product MICROSOFT WLNOTEBOOK3 0x00d2 Wireless Optical Mouse 3000 (Model 1049) product MICROSOFT WLNOTEBOOK2 0x00e1 Wireless Optical Mouse 3000 (Model 1056) product MICROSOFT XBOX360 0x0292 XBOX 360 WLAN +product MICROSOFT 24GHZ_XCVR10 0x071d 2.4GHz Transceiver V1.0 +product MICROSOFT 24GHZ_XCVR20 0x071f 2.4GHz Transceiver V2.0 +product MICROSOFT 24GHZ_XCVR50 0x074f 2.4GHz Transceiver V5.0 +