All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: linux-kernel@vger.kernel.org, Alan Cox <laughing@shared-source.org>
Subject: Re: USB mouse wheel breakage was Re: Linux 2.4.5-ac5
Date: Fri, 1 Jun 2001 16:31:10 +0200	[thread overview]
Message-ID: <20010601163110.A2525@suse.cz> (raw)
In-Reply-To: <20010530213039.A25251@lightning.swansea.linux.org.uk> <20010601105717.A2468@debian>
In-Reply-To: <20010601105717.A2468@debian>; from leahcim@ntlworld.com on Fri, Jun 01, 2001 at 10:57:17AM +0100

[-- Attachment #1: Type: text/plain, Size: 1135 bytes --]

On Fri, Jun 01, 2001 at 10:57:17AM +0100, Michael wrote:

> On Wed, May 30, 2001 at 09:30:39PM +0100, Alan Cox wrote:
> > 2.4.5-ac4
> > o	Update USB hid drivers				(Vojtech Pavlik)
> 
> I think these changes have broken my USB wheel mouse.
> 
> Events seems to be getting lost (/dev/input/mice)
> 
> It only scrolls when either the scroll direction has changed or if other
> mouse events occur (e.g. you need to wiggle mouse from side to side to
> scroll down a long page in mozilla)
> 
> problems seems to be in drivers/usb/hid-core.c hid_input_field line 772
> 
> 	for (n = 0; n < count; n++) {
> 
> 		if (HID_MAIN_ITEM_VARIABLE & field->flags) {
> 
> 			if ((field->flags & HID_MAIN_ITEM_RELATIVE) && !value[n])
> 				continue;
> The next 2 lines are dropping the scroll wheel events (which appear in the
> input code as type:2, code: 8, value -1 or 1 depending on direction)
> 
> 			if (value[n] == field->value[n])
> 				continue;
> 			hid_process_event(hid, field, &field->usage[n], value[n]);
> 			continue;
> 		}

Thanks for the detailed report.
Here is the fix.

Alan, please apply this to -ac5.

-- 
Vojtech Pavlik
SuSE Labs

[-- Attachment #2: hid.fix.diff --]
[-- Type: text/plain, Size: 513 bytes --]

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;

      parent reply	other threads:[~2001-06-04  9:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-30 20:30 Linux 2.4.5-ac5 Alan Cox
2001-05-30 22:07 ` J . A . Magallon
2001-06-01  9:57 ` USB mouse wheel breakage was " Michael
2001-06-01 12:43   ` Robert M. Love
2001-06-01 21:32     ` Robert M. Love
2001-06-02 20:53       ` Michael
2001-06-04  9:31       ` Vojtech Pavlik
2001-06-01 14:31   ` Vojtech Pavlik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010601163110.A2525@suse.cz \
    --to=vojtech@suse.cz \
    --cc=laughing@shared-source.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.