[libhid-discuss] error sending control message

Brent Bushnell brent at uwink.com
Wed Feb 18 03:19:19 UTC 2009


On Feb 14, 2009, at 10:40 AM, Charles Lepple wrote:

> On Feb 13, 2009, at 3:27 PM, Brent Bushnell wrote:
>
>> [root at host1 usbhid]# dmesg | tail
>> input: USB HID v1.00 Keyboard [ID Innovations Inc. Magnetic Card
>> Reader] on usb-0000:00:1d.2-2
>
> This says that the 'input' driver has grabbed that interface.
>
>> hiddev97: USB HID v1.00 Device [ID Innovations Inc. Magnetic Card
>> Reader] on usb-0000:00:1d.2-2
>
> This says the 'hiddev' driver has grabbed that interface. I believe  
> hiddev is subordinate to the 'usbhid' driver.
>
>> usb 1-1: USB disconnect, address 4
>> usb 1-1.1: USB disconnect, address 5
>> usb 3-1: new low speed USB device using uhci_hcd and address 4
>> usb 3-1: configuration #1 chosen from 1 choice
>> input: CHESEN PS2 to USB Converter as /class/input/input5
>> input: USB HID v1.10 Keyboard [CHESEN PS2 to USB Converter] on
>> usb-0000:00:1d.2-1
>> input: CHESEN PS2 to USB Converter as /class/input/input6
>> input: USB HID v1.10 Mouse [CHESEN PS2 to USB Converter] on
>> usb-0000:00:1d.2-1
>>
>> [root at host1 usbhid]# cd /sys/bus/usb/drivers/usbhid
>
> So for the first interface, maybe try 'cd /sys/bus/usb/drivers/ 
> input' or something?h

Sadly, there's no such driver directory.

In fact, usbhid is the only directory at that level in the sys path  
that contains the filenames for my device.

[root at host1 ~]# cd /sys/bus/usb/drivers/
[root at host1 drivers]# ls *
hiddev:
bind  new_id  unbind

hub:
1-0:1.0  2-0:1.0  3-0:1.0  4-0:1.0  5-0:1.0  bind  new_id  unbind

usb:
2-1  3-2  4-1  4-2  bind  unbind  usb1  usb2  usb3  usb4  usb5

usbfs:
bind  new_id  unbind

usbhid:
2-1:1.0  2-1:1.1  3-2:1.0  3-2:1.1  4-1:1.0  4-1:1.1  4-2:1.0  bind   
new_id  unbind

Potentially more interesting, is that while unbinding 3-2:1.1 makes  
the second set of report descriptors available, unbinding 3-2:1.0  
causes the usbhid driver to be automatically added back for both.

[root at host1 usbhid]# ls
2-1:1.0  2-1:1.1  3-2:1.0  3-2:1.1  4-1:1.0  4-1:1.1  4-2:1.0  bind   
new_id  unbind
[root at host1 usbhid]# echo -n 3-2\:1.1 > unbind
[root at host1 usbhid]# ls
2-1:1.0  2-1:1.1  3-2:1.0  4-1:1.0  4-1:1.1  4-2:1.0  bind  new_id   
unbind
[root at host1 usbhid]# echo -n 3-2\:1.0 > unbind
[root at host1 usbhid]# ls
2-1:1.0  2-1:1.1  4-1:1.0  4-1:1.1  4-2:1.0  bind  new_id  unbind
[root at host1 usbhid]# ls
2-1:1.0  2-1:1.1  3-2:1.0  3-2:1.1  4-1:1.0  4-1:1.1  4-2:1.0  bind   
new_id  unbind


We have successfully blacklisted the device in the driver to get  
around this problem but I was hoping there was a better way.   It  
turns out *later* kernels (>=2.6.22) allow passing quirk arguments to  
the module in /etc/modprobe.d, but CentOS 5 doesn't support it.

See:
http://www.centos.org/modules/newbb/print.php?form=1&topic_id=16474&forum=39&order=ASC&start=0
http://code.google.com/p/atv-bootloader/wiki/UpdateIRDriver
http://groups.google.com/group/fa.linux.kernel/browse_thread/thread/357d28807a8bd967






More information about the libhid-discuss mailing list