On Wed, Nov 28, 2001 at 12:04:12PM -0800, Richard Moats wrote:
> Hi -- I've found an issue with hid-core and the Logitech Marble Mouse
> trackball that causes hid-input to report a bogus ABS_MISC axis to evdev.
>
> The problem seems to be that when hid-core parses the HID report
> descriptor it attributes one 'usage' to the 1x6 bit constant padding item
> in the MarbleMouse's report and incorrectly adds a field for it (see
> MarbleMouse report descriptor and the hid-debug device dump below.)
>
> Later on when hid-input prepares the device capabilities for evdev, it
> generates BTN_LEFT, BTN_RIGHT, REL_X, REL_Y, and ABS_MISC. The ABS_MISC
> is generated from the bogus padding field because the Usage Page is 0
> (which is undefined and reserved in USB spec.)
>
> The following change in hid-core.c causes the usages for the padding item
> to be 0 (and so avoids adding the field for lack of usages), but I suspect
> that someone made usages=report_count for a reason. Usages being recorded
> differently for arrays vs. variables seems curious...
I'm currently searching for what the reason could have been. This is
still Andreas Gal's code which I haven't changed, since it worked well
enough.
> hid-core.c:hid_add_field( ... )
> {
> // ...
> if (HID_MAIN_ITEM_VARIABLE & ~flags) { /* ARRAY */
> // ...
> usages = parser->local.usage_index;
> } else { /* VARIABLE */
> - usages = parser->global.report_count;
> + usages = parser->local.usage_index;
> }
> // ...
> }
--
Vojtech Pavlik
SuSE Labs
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users