Re: usb2 moused issue (Microsoft Wireless Optical)

From: Giorgos Keramidas <keramida_at_freebsd.org>
Date: Tue, 17 Feb 2009 22:20:03 +0200
On Tue, 17 Feb 2009 20:40:05 +0100, Hans Petter Selasky <hselasky_at_freebsd.org> wrote:
> On Tuesday 17 February 2009, Giorgos Keramidas wrote:
>> On Tue, 17 Feb 2009 20:55:30 +0200, Giorgos Keramidas <keramida_at_FreeBSD.org> 
> wrote:
>> > The code of hid_report_size() is similar in old usb and the new usb
>> > stack, but I am not sure about all the differences I see.  The
>> > calculation of `size' is done correctly with old usb code, so I am
>> > testing the patch attached below now.  It essentially pulls in the
>> > hid_report_size() from the old usb code, with the if (h.kind == k) check
>> > reversed to remove one spurious indentation level:
>>
>> No luck with the old usb code for hid_report_size() either.  We may be
>> looking at the wrong place.  I'll build a kernel with a pre-usb2 stack
>> and see what ums debugging shows for this mouse.  If it used to work
>> with size=2 then we might have to look elsewhere for the bug.
>
> I don't think that will help. Can you try the following.
>
> XYZ information includes: (64+8-40)/8 = 4 bytes
>
> Then you need add one PD byte, so size should be 5 bytes.

Yep.  Before kldloading usb2_quirk.ko this is the X/Y/Z information:

  kernel: ums_attach:583: X  48/8
  kernel: ums_attach:584: Y  56/8
  kernel: ums_attach:585: Z  64/8

After kldloading the quirks, I now see:

  kernel: ugen4.2: <Microsoft> at usbus4
  kernel: ums0: <Microsoft Wireless Optical Mouse 3000 (Model 1056), class 0/0, rev 2.00/0.07, addr 2> on usbus4
  kernel: ums0: 3 buttons and [XYZ] coordinates
  kernel: ums_attach:582: sc=0xc662f000
  kernel: ums_attach:583: X  16/8
  kernel: ums_attach:584: Y  24/8
  kernel: ums_attach:585: Z  32/8
  kernel: ums_attach:586: T  0/0
  kernel: ums_attach:587: W  0/0
  kernel: ums_attach:591: B1 8/1
  kernel: ums_attach:591: B2 9/1
  kernel: ums_attach:591: B3 10/1
  kernel: ums_attach:593: size=5, id=0
  kernel: Symlink: ums0 -> usb4.2.0.16

and AFAICT the mouse seems to work now.

Thanks! :)
Received on Tue Feb 17 2009 - 19:20:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC