diff mbox

[RFC,ebeam,v3,1/2] hid: Blacklist new eBeam classic device

Message ID 1344288104-20731-2-git-send-email-yann.cantin@laposte.net (mailing list archive)
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Yann Cantin Aug. 6, 2012, 9:21 p.m. UTC
Signed-off-by: Yann Cantin <yann.cantin@laposte.net>
---
 drivers/hid/hid-core.c |    3 +++
 drivers/hid/hid-ids.h  |    3 +++
 2 files changed, 6 insertions(+)

Comments

Greg KH Aug. 6, 2012, 9:43 p.m. UTC | #1
On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote:
> 
> Signed-off-by: Yann Cantin <yann.cantin@laposte.net>
> ---
>  drivers/hid/hid-core.c |    3 +++
>  drivers/hid/hid-ids.h  |    3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index 60ea284..b1ed8ee 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[] = {
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) },
>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) },
> +#if defined(CONFIG_INPUT_EBEAM_USB)
> +	{ HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) },
> +#endif

Why is this #if in here?  Just always do it, how could it not be
defined?

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Dmitry Torokhov Aug. 6, 2012, 10:07 p.m. UTC | #2
On Monday, August 06, 2012 02:43:40 PM Greg KH wrote:
> On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote:
> > Signed-off-by: Yann Cantin <yann.cantin@laposte.net>
> > ---
> > 
> >  drivers/hid/hid-core.c |    3 +++
> >  drivers/hid/hid-ids.h  |    3 +++
> >  2 files changed, 6 insertions(+)
> > 
> > diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> > index 60ea284..b1ed8ee 100644
> > --- a/drivers/hid/hid-core.c
> > +++ b/drivers/hid/hid-core.c
> > @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[]
> > = {> 
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20)
> >  	},
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) },
> >  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) },
> > 
> > +#if defined(CONFIG_INPUT_EBEAM_USB)
> > +	{ HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) },
> > +#endif
> 
> Why is this #if in here?  Just always do it, how could it not be
> defined?

User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be
set. But I agree, since the device is unusable with generic HID driver
there is no point in doing this conditionally.
Yann Cantin Aug. 7, 2012, 1:21 a.m. UTC | #3
Le 07/08/2012 00:07, Dmitry Torokhov a écrit :
> On Monday, August 06, 2012 02:43:40 PM Greg KH wrote:
>> On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote:
>>> Signed-off-by: Yann Cantin <yann.cantin@laposte.net>
>>> ---
>>>
>>>  drivers/hid/hid-core.c |    3 +++
>>>  drivers/hid/hid-ids.h  |    3 +++
>>>  2 files changed, 6 insertions(+)
>>>
>>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>>> index 60ea284..b1ed8ee 100644
>>> --- a/drivers/hid/hid-core.c
>>> +++ b/drivers/hid/hid-core.c
>>> @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[]
>>> = {> 
>>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20)
>>>  	},
>>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) },
>>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) },
>>>
>>> +#if defined(CONFIG_INPUT_EBEAM_USB)
>>> +	{ HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) },
>>> +#endif
>>
>> Why is this #if in here?  Just always do it, how could it not be
>> defined?
> 
> User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be
> set. But I agree, since the device is unusable with generic HID driver
> there is no point in doing this conditionally.

There's a closed-source user-space stack (libusb based daemon + xorg driver
+ wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010,
maybe others but break on recent xorg).

I don't know exactly what to do : i don't want to break hypothetical support,
even proprietary.
Leaving the choice at kernel compile time seems to be safer, no ?
Dmitry Torokhov Aug. 7, 2012, 1:45 a.m. UTC | #4
On Tue, Aug 07, 2012 at 03:21:45AM +0200, Yann Cantin wrote:
> Le 07/08/2012 00:07, Dmitry Torokhov a écrit :
> > On Monday, August 06, 2012 02:43:40 PM Greg KH wrote:
> >> On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote:
> >>> Signed-off-by: Yann Cantin <yann.cantin@laposte.net>
> >>> ---
> >>>
> >>>  drivers/hid/hid-core.c |    3 +++
> >>>  drivers/hid/hid-ids.h  |    3 +++
> >>>  2 files changed, 6 insertions(+)
> >>>
> >>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> >>> index 60ea284..b1ed8ee 100644
> >>> --- a/drivers/hid/hid-core.c
> >>> +++ b/drivers/hid/hid-core.c
> >>> @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[]
> >>> = {> 
> >>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20)
> >>>  	},
> >>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) },
> >>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) },
> >>>
> >>> +#if defined(CONFIG_INPUT_EBEAM_USB)
> >>> +	{ HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) },
> >>> +#endif
> >>
> >> Why is this #if in here?  Just always do it, how could it not be
> >> defined?
> > 
> > User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be
> > set. But I agree, since the device is unusable with generic HID driver
> > there is no point in doing this conditionally.
> 
> There's a closed-source user-space stack (libusb based daemon + xorg driver
> + wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010,
> maybe others but break on recent xorg).
> 
> I don't know exactly what to do : i don't want to break hypothetical support,
> even proprietary.
> Leaving the choice at kernel compile time seems to be safer, no ?

If they are using libusb that means that they use userspace solution and
do not require HID or any other in-kernel driver. They should still be
able to claim the port even if your driver is in use.

Thanks.
Yann Cantin Aug. 7, 2012, 8:10 a.m. UTC | #5
Le 07/08/2012 03:45, Dmitry Torokhov a écrit :
> On Tue, Aug 07, 2012 at 03:21:45AM +0200, Yann Cantin wrote:
>> Le 07/08/2012 00:07, Dmitry Torokhov a écrit :
>>> On Monday, August 06, 2012 02:43:40 PM Greg KH wrote:
>>>> On Mon, Aug 06, 2012 at 11:21:43PM +0200, Yann Cantin wrote:
>>>>> Signed-off-by: Yann Cantin <yann.cantin@laposte.net>
>>>>> ---
>>>>>
>>>>>  drivers/hid/hid-core.c |    3 +++
>>>>>  drivers/hid/hid-ids.h  |    3 +++
>>>>>  2 files changed, 6 insertions(+)
>>>>>
>>>>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>>>>> index 60ea284..b1ed8ee 100644
>>>>> --- a/drivers/hid/hid-core.c
>>>>> +++ b/drivers/hid/hid-core.c
>>>>> @@ -1908,6 +1908,9 @@ static const struct hid_device_id hid_ignore_list[]
>>>>> = {> 
>>>>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20)
>>>>>  	},
>>>>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) },
>>>>>  	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) },
>>>>>
>>>>> +#if defined(CONFIG_INPUT_EBEAM_USB)
>>>>> +	{ HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) },
>>>>> +#endif
>>>>
>>>> Why is this #if in here?  Just always do it, how could it not be
>>>> defined?
>>>
>>> User might disable the driver and CONFIG_INPUT_EBEAM_USB will not be
>>> set. But I agree, since the device is unusable with generic HID driver
>>> there is no point in doing this conditionally.
>>
>> There's a closed-source user-space stack (libusb based daemon + xorg driver
>> + wine apps) provided for some distro (Ubuntu 10.04, works on mandriva 2010,
>> maybe others but break on recent xorg).
>>
>> I don't know exactly what to do : i don't want to break hypothetical support,
>> even proprietary.
>> Leaving the choice at kernel compile time seems to be safer, no ?
> 
> If they are using libusb that means that they use userspace solution and
> do not require HID or any other in-kernel driver. They should still be
> able to claim the port even if your driver is in use.

Ok, that solve one of my issue.
But if the driver isn't built, there will be absolutely no kernel support,
even basic hiddev/hidraw. Is there a kernel policy for that situation ?
diff mbox

Patch

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 60ea284..b1ed8ee 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1908,6 +1908,9 @@  static const struct hid_device_id hid_ignore_list[] = {
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DELORME, USB_DEVICE_ID_DELORME_EM_LT20) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x0004) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_DREAM_CHEEKY, 0x000a) },
+#if defined(CONFIG_INPUT_EBEAM_USB)
+	{ HID_USB_DEVICE(USB_VENDOR_ID_EFI, USB_DEVICE_ID_EFI_CLASSIC) },
+#endif
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC5UH) },
 	{ HID_USB_DEVICE(USB_VENDOR_ID_ETT, USB_DEVICE_ID_TC4UM) },
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 1dcb76f..b985059 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -271,6 +271,9 @@ 
 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349	0x7349
 #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001	0xa001
 
+#define USB_VENDOR_ID_EFI		0x2650
+#define USB_DEVICE_ID_EFI_CLASSIC	0x1311
+
 #define USB_VENDOR_ID_ELECOM		0x056e
 #define USB_DEVICE_ID_ELECOM_BM084	0x0061