Re: SideWinder GameVoice driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux