From: Tomas Carnecky <tom@dbservice.com>
To: Jiri Kosina <jikos@jikos.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: SideWinder GameVoice driver
Date: Sat, 19 May 2007 11:18:47 +0200 [thread overview]
Message-ID: <464EC0F7.20004@dbservice.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0705190111310.27422@twin.jikos.cz>
Jiri Kosina wrote:
> On Sat, 19 May 2007, Tomas Carnecky wrote:
>> I already thought about this option (to whitelist this particular
>> vendor/device ID as an hid-input device), but I first wanted some
>> feedback on the whole situation. As for the patch, I have zero knowledge
>> of the hid subsystem.. but if you give me a go on this, I'll try to dig
>> into the code and make a patch :)
>
> Adding a HID_QUIRK_HIDINPUT quirk makes maybe a more sense than fixing
> this particular report descriptor to stop pretending that the device is
> Telephony/Headset - we might in future discover that there are more
> devices that have broken report descriptors and that we want to be forced
> to be handled by hid-input subsystem.
>
> So, could you please test whether the quick and untested patch below
> (against 2.6.22-rc1) works as expected with the device?
Applied to -rc1, rebased to -rc2, works as expected. Thanks.
> diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
> index 7f81789..8696dbe 100644
> --- a/drivers/hid/hid-input.c
> +++ b/drivers/hid/hid-input.c
> @@ -976,7 +976,7 @@ int hidinput_connect(struct hid_device *
> if (IS_INPUT_APPLICATION(hid->collection[i].usage))
> break;
>
> - if (i == hid->maxcollection)
> + if (i == hid->maxcollection && (hid->quirks & HID_QUIRK_HIDINPUT) == 0)
> return -1;
>
> if (hid->quirks & HID_QUIRK_SKIP_OUTPUT_REPORTS)
> diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
> diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
> index f6c4145..62a7f1e 100644
> --- a/drivers/hid/usbhid/hid-quirks.c
> +++ b/drivers/hid/usbhid/hid-quirks.c
> @@ -209,6 +209,9 @@
> #define USB_DEVICE_ID_MGE_UPS 0xffff
> #define USB_DEVICE_ID_MGE_UPS1 0x0001
>
> +#define USB_VENDOR_ID_MICROSOFT 0x045e
> +#define USB_DEVICE_ID_SIDEWINDER_GV 0x003b
> +
> #define USB_VENDOR_ID_NEC 0x073e
> #define USB_DEVICE_ID_NEC_USB_GAME_PAD 0x0301
>
> @@ -290,6 +293,7 @@ static const struct hid_blacklist {
> { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE, HID_QUIRK_DUPLICATE_USAGES },
>
> { USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM, HID_QUIRK_HIDDEV },
> + { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV, HID_QUIRK_HIDINPUT },
>
> { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_01, HID_QUIRK_IGNORE },
> { USB_VENDOR_ID_AIPTEK, USB_DEVICE_ID_AIPTEK_10, HID_QUIRK_IGNORE },
> diff --git a/include/linux/hid.h b/include/linux/hid.h
> index 827ee74..6e45d10 100644
> --- a/include/linux/hid.h
> +++ b/include/linux/hid.h
> @@ -276,6 +276,7 @@ struct hid_item {
> #define HID_QUIRK_DUPLICATE_USAGES 0x00200000
> #define HID_QUIRK_RESET_LEDS 0x00400000
> #define HID_QUIRK_SWAPPED_MIN_MAX 0x00800000
> +#define HID_QUIRK_HIDINPUT 0x01000000
>
> /*
> * This is the global environment of the parser. This information is
>
next prev parent reply other threads:[~2007-05-19 8:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-17 13:59 Tomas Carnecky
2007-05-17 14:28 ` Jiri Kosina
2007-05-17 15:11 ` Tomas Carnecky
2007-05-17 18:47 ` Tomas Carnecky
2007-05-17 21:31 ` Jiri Kosina
2007-05-18 7:01 ` Tomas Carnecky
2007-05-18 21:19 ` Jiri Kosina
2007-05-18 22:08 ` Tomas Carnecky
2007-05-18 23:31 ` Jiri Kosina
2007-05-19 9:18 ` Tomas Carnecky [this message]
2007-05-18 22:20 ` Lee Revell
2007-05-18 22:30 ` Jiri Kosina
2007-05-19 8:24 ` Tomas Carnecky
2007-05-22 22:04 ` Bill Davidsen
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=464EC0F7.20004@dbservice.com \
--to=tom@dbservice.com \
--cc=jikos@jikos.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome