mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brad Hards <bhards@bigpond.net.au>
To: Chris Faherty <rallymonkey@bellsouth.net>,
	<linux-kernel@vger.kernel.org>
Subject: Re: Logitech Mouseman Dual Optical defaults to 400cpi
Date: Mon, 10 Jun 2002 10:57:20 +1000	[thread overview]
Message-ID: <200206101057.20259.bhards@bigpond.net.au> (raw)
In-Reply-To: <20020608165243Z317422-22020+923@vger.kernel.org> <200206091807.11524.bhards@bigpond.net.au> <20020609151922Z317623-22020+1197@vger.kernel.org>

On Mon, 10 Jun 2002 01:19, Chris Faherty wrote:
> On Sunday 09 June 2002 04:07 am, Brad Hards wrote:
> > Was that using Snoopy?
>
> I believe that's what it was called.  The program was sniffusb 0.13.  I had
> problems get later versions to work.  Then I found a nice treatise on
> interpreting the log:
>
> http://www.toth.demon.co.uk/usb/reverse-0.2.txt
I'll have to check it out. There are a number of resources (including a nice 
Perl script that gets rid of much of the verbosity).
Later versions may be W2K, rather than for 98: 
http://sourceforge.net/projects/usbsnoop/

> > Any objections to me taking this to 2.4 and 2.5?
>
> Feel free.  I wonder if MS Intellimouse 3.0 has the same resolution
> problem. AFAIK they use the same sensor.
Probably not, because only low end manufacturers use reference designs 
directly. I have an intellimouse around here somewhere. Don't know anything 
about it, because it wouldn't have occurred to me to read the manual or 
install the windows drivers. Might have to check it out.

> > This could have been handled by a blacklist table quirk. Any reason why
> > you chose to do it this way?
>
> How does the blacklist work?  Originally I wanted to put the setting in
> mousedev but I wasn't sure how to access the usb_device from there.
Basically we declare a quirk (in drivers/usb/hid.h)
#define HID_QUIRK_LOGITECH_HIRES

and then associate the manufacturer and product IDs for the device with the 
quirk in hid-core.c (in hid_blacklist[])
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DOPTICAL, 
HID_QUIRK_LOGITECH_HIRES },

And then use (hid->quirk & HID_QUIRK_LOGITECH_HIRES) as the test instead of 
((hid->dev->descriptor.idVendor == USB_VENDOR_ID_LOGITECH) &&
(hid->dev->descriptor.idProduct == USB_DEVICE_ID_LOGITECH_DOPTICAL)) in the 
routine you actually want to vary.

The advantage is really apparent when Logitech brings out another device with 
different product ID (eg a different colour plastic) that has the same 
firmware and needs the same change. Much easier to add to the (now badly 
misnamed) blacklist than to add more and more conditions to the if().

I'll try for a patch later, that might make this a bit clearer.

Brad


-- 
http://conf.linux.org.au. 22-25Jan2003. Perth, Australia. Birds in Black.

  reply	other threads:[~2002-06-10  1:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-08 16:53 Chris Faherty
2002-06-09  0:25 ` Chris Faherty
2002-06-09  8:07   ` Brad Hards
2002-06-09 15:19     ` Chris Faherty
2002-06-10  0:57       ` Brad Hards [this message]
2002-06-10 21:26         ` Vojtech Pavlik
2002-06-11  4:52           ` Chris Faherty
     [not found]           ` <20020611045213.8B1FA59D354@kerberos.suse.cz>
2002-06-11  5:56             ` Vojtech Pavlik
2002-06-11  6:30               ` Chris Faherty
     [not found]               ` <20020611062940.8172959D354@kerberos.suse.cz>
2002-06-11  6:34                 ` Vojtech Pavlik
2002-06-12 19:22           ` Pavel Machek

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=200206101057.20259.bhards@bigpond.net.au \
    --to=bhards@bigpond.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rallymonkey@bellsouth.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®