Re: USB mouse wheel breakage was Re: Linux 2.4.5-ac5

Michael
2001-06-02T20:53:36Z

On Fri, Jun 01, 2001 at 05:32:26PM -0400, Robert M. Love wrote:
> I and another user thought the problem was in hid_input_field, but upon
> looking I now think not.

It is, check against hid.c in 2.4.5, the new code &&'s the first 2 if statements and so it
now checks non-zero HID_MAIN_INPUT_RELATIVE values for new and old being
the same, which AFAICT, they can and often will be.

Patch against ac6 reverts back to original hid.c check :-

--- ../linux.orig/drivers/usb/hid-core.c Sat Jun 2 21:47:35 2001
+++ drivers/usb/hid-core.c Sat Jun 2 21:46:00 2001
@@ -773,10 +773,11 @@

if (HID_MAIN_ITEM_VARIABLE & field->flags) {

- if ((field->flags & HID_MAIN_ITEM_RELATIVE) && !value[n])
- continue;
- if (value[n] == field->value[n])
- continue;
+ if (field->flags & HID_MAIN_ITEM_RELATIVE) {
+ if (!value[n]) continue;
+ } else {
+ if (value[n] == field->value[n]) continue;
+ }
hid_process_event(hid, field, &field->usage[n], value[n]);
continue;
}

--
Michael.