Skip to contentSkip to conversation

Remove Phidget Blacklist if kernel driver is not selected

DISCUSSION James Lamanna 2 participants 2 messages Aug 29, 2004 – Sep 6, 2004

lore
Share & tools
lore
#0 lore raw

This patch (compile-tested not runtime tested yet) is to remove the blacklisting of Phidgets
if the PhidgetServo kernel driver is not included in the kernel.
(Right now it gets rid of all Phidget Blacklists, as more drivers are added I would expect they would be per-driver segmented).

It gets quite annoying to have to patch recent kernels everytime to use userspace tools (libhid + libphidgets) as opposed to using the kernel driver, which cannot be used because of the HID blacklist.

I don't understand why a kernel driver for the PhidgetServo was included in the kernel. Wasn't the point of the HID layer to be able to present HID devices to userspace so that kernel drivers don't have to be written for each and every device?
It seems to be that the way to control a fairly simple device like the PhidgetServo is through userspace and the kernel shouldn't be bothered with the device control details.

-- James Lamanna

--- linux-2.6.8.1/drivers/usb/input/hid-core.c 2004-08-14 03:55:33.000000000 -0700 +++ linux-2.6.8.1-phidget/drivers/usb/input/hid-core.c 2004-08-29 14:53:36.037632992 -0700
@@ -1493,6 +1493,7 @@
{ USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE },

+#ifdef CONFIG_USB_PHIDGETSERVO
{ USB_VENDOR_ID_GLAB, USB_DEVICE_ID_4_PHIDGETSERVO_30, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_1_PHIDGETSERVO_30, HID_QUIRK_IGNORE }, { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_8_8_8_IF_KIT, HID_QUIRK_IGNORE },
@@ -1501,6 +1502,7 @@

{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20,
HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20,
HID_QUIRK_IGNORE },
+#endif

{ USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_UC100KM, HID_QUIRK_NOGET }, { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_CS124U, HID_QUIRK_NOGET },

#1 lore raw
Quoted 13 lines · James Lamanna

This patch (compile-tested not runtime tested yet) is to remove the blacklisting of Phidgets
if the PhidgetServo kernel driver is not included in the kernel.
(Right now it gets rid of all Phidget Blacklists, as more drivers are added I would expect they would be per-driver segmented).

It gets quite annoying to have to patch recent kernels everytime to use userspace tools (libhid + libphidgets) as opposed to using the kernel driver, which cannot be used because of the HID blacklist.

Quoted 9 lines

I don't understand why a kernel driver for the PhidgetServo was included in the kernel. Wasn't the point of the HID layer to be able to present HID devices to userspace so that kernel drivers don't have to be written for each and every device?
It seems to be that the way to control a fairly simple device like the PhidgetServo is through userspace and the kernel shouldn't be bothered with the device control details.

Yes, you are correct. I'm going to rip out the in-kernel version (Oh no! Not again...) because this can all be done better and safer from userspace.

But the hid blacklist is still correct, even when using the userspace library, as the hid driver should never bind to these devices.

thanks,

greg k-h