This is a discussion on Re: FreeBSD 7, Razer Copperhead mouse patch - FreeBSD ; Jase Thew wrote: > John Baldwin wrote: >> On Saturday 23 February 2008 03:32:41 pm Dominic Fandrey wrote: >>> Oliver Herold wrote: >>>> Hi >>>> >>>> the Razer Copperhead mouse did work in FreeBSD 7 (current) for a long >>>> ...
Jase Thew wrote:
> John Baldwin wrote:
>> On Saturday 23 February 2008 03:32:41 pm Dominic Fandrey wrote:
>>> Oliver Herold wrote:
>>>> the Razer Copperhead mouse did work in FreeBSD 7 (current) for a long
>>>> time, but after some period it stopped working. This patch from Uwe
>>>> fixes this wrong behaviour (it's detected as keyboard) and makes the
>>>> mouse work in FreeBSD 7 again. Would be imho a nice addition for
>>>> RELENG_7 (stable) or even Release.
>>>> Cheers, Oliver
>>> Being a Razer fan and user I totally agree.
>> Can you try this patch instead?
>> Index: ums.c
>> ================================================== =================
>> RCS file: /usr/cvs/src/sys/dev/usb/ums.c,v
>> retrieving revision 1.97
>> diff -u -r1.97 ums.c
>> --- ums.c 26 Dec 2007 14:31:16 -0000 1.97
>> +++ ums.c 27 Feb 2008 21:40:48 -0000
>> @@ -198,7 +198,10 @@
>> if (err)
>> return (UMATCH_NONE);
>> - if (id->bInterfaceClass == UICLASS_HID &&
>> + if (hid_is_collection(desc, size,
>> + HID_USAGE2(HUP_GENERIC_DESKTOP, HUG_MOUSE)))
>> + ret = UMATCH_IFACECLASS;
>> + else if (id->bInterfaceClass == UICLASS_HID &&
>> id->bInterfaceSubClass == UISUBCLASS_BOOT &&
>> id->bInterfaceProtocol == UIPROTO_MOUSE)
>> ret = UMATCH_IFACECLASS;
> Out of curiosity, what was wrong with the way I did it in my patch?
Ah, I see John has described why in the PR.
As the hid collection test doesn't seem to be working fully, what would
be the downside of testing the descriptor directly but removing the
SubClass test, as the spec defines only two available values - 1 for
using Boot Protocol and 2 for Unknown.
As we can't test for a SubClass of 0 (due to the reason you mention
above), removing the SubClass test will reintroduce full support for
mice that report as not using boot protocol (such as the various Razor
email@example.com mailing list
To unsubscribe, send any mail to "firstname.lastname@example.org"