Opened 2 years ago
Closed 2 years ago
#18008 closed bug (fixed)
USB HID driver improperly handle device removing
Reported by: | zelenoviy | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | R1/beta4 |
Component: | Drivers/Input/HID/USB | Version: | R1/beta3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
USB HID driver improperly handle usb device removing events in case of complex device (e.g. multiple hid devices on multiple interfaces on one usb parent device). It remove only first published device.
Attachments (1)
Change History (6)
by , 2 years ago
Attachment: | usb_hid_device_remove_fix.patch added |
---|
comment:2 by , 2 years ago
Its "MOTORSPEED" - a chinese mechanical keyboard
[Device /dev/bus/usb/2/5] Class .................. 0x00 ((Defined at Interface level) ()) Subclass ............... 0x00(Defined at Interface level) () Protocol ............... 0x00(Defined at Interface level) () Max Endpoint 0 Packet .. 64 USB Version ............ 2.0 Vendor ID .............. 0x0c45 (Microdia) Product ID ............. 0x8502 Product Version ........ 0x0106 Manufacturer String .... "SONiX" Product String ......... "USB DEVICE" Serial Number .......... "" [Configuration 0] Configuration String . "" [Interface 0] [Alternate 0 active] Class .............. 0x03 (Human Interface Device (No Subclass, None)) Subclass ........... 0x01Human Interface Device (Boot Interface Subclass, None) Protocol ........... 0x01Human Interface Device (Boot Interface Subclass, Keyboard) Interface String ... "" [Endpoint 0] MaxPacketSize .... 8 Interval ......... 8 Type ............. Interrupt Direction ........ Input [Descriptor 0] Type ............. 0x21 Data ............. 11 01 00 01 22 4f 00 [Interface 1] [Alternate 0 active] Class .............. 0x03 (Human Interface Device (No Subclass, None)) Subclass ........... 0x01Human Interface Device (Boot Interface Subclass, None) Protocol ........... 0x02Human Interface Device (Boot Interface Subclass, Mouse) Interface String ... "" [Endpoint 0] MaxPacketSize .... 64 Interval ......... 1 Type ............. Interrupt Direction ........ Input [Descriptor 0] Type ............. 0x21 Data ............. 11 01 00 01 22 71 00
I dot understood yet why it register 3(!) HID devices and all the keyboards.
For first device (input/keyboard/usb/0)
usb_hid: root collection holds 1 application collection usb_hid: collection usage page 1 usage id 6 ... usb_hid: keyboard device with 6 keys and 8 modifiers usb_hid: input report: 0; output report: 0 usb_hid: collection not a joystick or gamepad usb_hid: collection not a mouse usb_hid: collection not a tablet/digitizer usb_hid: added 1 handlers for hid device
For second two
usb_hid: keyboard device with 120 keys and 0 modifiers usb_hid: input report: 1; output report: 255 usb_hid: collection not a joystick or gamepad usb_hid: collection not a mouse usb_hid: collection not a tablet/digitizer usb_hid: collection usage page 1 usage id 128 usb_hid: collection not a supported keyboard subset usb_hid: collection not a joystick or gamepad usb_hid: collection not a mouse usb_hid: collection not a tablet/digitizer usb_hid: collection usage page 12 usage id 1 usb_hid: input report count: 1 usb_hid: keyboard item with usage c0000 usb_hid: keyboard device with 1 keys and 0 modifiers usb_hid: input report: 3; output report: 255 usb_hid: collection not a joystick or gamepad usb_hid: collection not a mouse usb_hid: collection not a tablet/digitizer usb_hid: collection usage page 65308 usage id 146 usb_hid: collection not a supported keyboard subset usb_hid: collection not a joystick or gamepad usb_hid: collection not a mouse usb_hid: collection not a tablet/digitizer usb_hid: added 2 handlers for hid device
And yes, its not working properly on Haiku, but its another problem
comment:4 by , 2 years ago
waddlesplash, seeing the DeviceList implementation, it's logical (a linked list accessed by index).
comment:5 by , 2 years ago
Milestone: | Unscheduled → R1/beta4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Merged in hrev56570. Thanks for investigating this and providing a patch!
fix patch