On Fri, Jun 01, 2001 at 05:32:26PM -0400, Robert M. Love wrote:
> USB mouse wheel has been broke since 2.4.5-ac4 (when new USB HID,
> hid-core.c, was integrated).  The mouse in general seems jerky, and
> specifically the input device does not receive events for consecutive
> wheel movements -- just the first "spin," until the mouse is moved
> again.
> 
> obviously the bug is in the new hid-core.c, but I confirmed this by
> compiling with that part of the ac6 patch removed.  I have since been
> trying to write a patch but I can not fix the problem, so I am reporting
> it to you.
> 
> I and another user thought the problem was in hid_input_field, but upon
> looking I now think not.
> 
> My mouse is fairly unusable in X, and unfortunately I can not figure out
> a fix.

It is a quite stupid bug. Here is the fix (already sent to Alan).

-- 
Vojtech Pavlik
SuSE Labs
diff -urN linux-2.4.5-ac4/drivers/usb/hid-core.c linux/drivers/usb/hid-core.c
--- linux-2.4.5-ac4/drivers/usb/hid-core.c      Tue May 29 19:48:15 2001
+++ linux/drivers/usb/hid-core.c        Fri Jun  1 16:30:33 2001
@@ -775,7 +775,7 @@
 
                        if ((field->flags & HID_MAIN_ITEM_RELATIVE) && !value[n])
                                continue;
-                       if (value[n] == field->value[n])
+                       if ((~field->flags & HID_MAIN_ITEM_RELATIVE) && value[n] == 
+field->value[n])
                                continue;
                        hid_process_event(hid, field, &field->usage[n], value[n]);
                        continue;

Reply via email to