Rebinding usb hid devices to hid-generic driver fails
using kernel 3.8.0-34-generic (Mint 15)
If I plug in a usb mouse (mfr/vendor id: 03F0:8607) it works fine and is (by default) handled with hid-generic: # tree /sys/bus/hid/drivers/hid-generic /sys/bus/hid/drivers/hid-generic ├── 0003:03F0:8607.0007 -> ../../../../devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.0/0003:03F0:8607.0007 ├── 0003:093A:2510.0001 -> ../../../../devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/0003:093A:2510.0001 ├── bind ├── module -> ../../../../module/hid_generic ├── new_id ├── uevent └── unbind Now I unbind the device: # echo -n 0003:03F0:8607.0007 > /sys/bus/hid/drivers/hid-generic/unbind The binding has gone: # tree /sys/bus/hid/drivers/hid-generic /sys/bus/hid/drivers/hid-generic ├── 0003:093A:2510.0001 -> ../../../../devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/0003:093A:2510.0001 ├── bind ├── module -> ../../../../module/hid_generic ├── new_id ├── uevent └── unbind and the mouse stops working - as expected. But now I want to rebind it: # echo -n 0003:03F0:8607.0007 > /sys/bus/hid/drivers/hid-generic/bind The binding apparently succeeds: # tree /sys/bus/hid/drivers/hid-generic /sys/bus/hid/drivers/hid-generic ├── 0003:03F0:8607.0008 -> ../../../../devices/pci0000:00/0000:00:12.2/usb1/1-2/1-2.1/1-2.1.2/1-2.1.2:1.0/0003:03F0:8607.0008 ├── 0003:093A:2510.0001 -> ../../../../devices/pci0000:00/0000:00:13.0/usb5/5-1/5-1:1.0/0003:093A:2510.0001 ├── bind ├── module -> ../../../../module/hid_generic ├── new_id ├── uevent └── unbind but the mouse doesn't start working again. Why not? The only thing that has changed is the instance number (in bold). Would you expect this to work or is the bind/unbind process a bit more complicated? |
Test
Hi, I tried your procedure with a USB bar code scanner (viewed as a HID-generic device) and work as aspected.
Regards Domenico |
All times are GMT -5. The time now is 07:26 PM. |