Thread (4 messages) 4 messages, 3 authors, 2020-08-18

Re: [PATCH v2] hwmon: corsair-cpro: fix ccp_probe, add delay [HID related]

flat view

From: Jiri Kosina <jikos@kernel.org>
Date: 2020-08-18 17:51:45
Also in: linux-hwmon, lkml

On Tue, 18 Aug 2020, Marius Zachmann wrote:
quoted
quoted
Possibly because of the changes in usbhid/hid-core.c the first
raw input report is not received during ccp_probe function and it will
timeout. I am not sure, whether this behaviour is expected after
hid_device_io_start or if I am missing something.
As a solution this adds msleep(50) to ccp_probe so that all initial
input reports can be received.

Signed-off-by: Marius Zachmann <mail@mariuszachmann.de>
Let's just ask the HID maintainers. Is this expected, and the correct fix ?
This seems to be a problem with "HID: usbhid: do not sleep when opening
device". There is a bug report with some Logitech devices at the correct
thread. These drivers also use hid_device_io_start and fail. Seems to me,
this is the same problem and I retract this (not so beautiful) fix until
this is sorted out.
[ CCing Dmitry ]

Yeah, this problem popped out also in other contexts, where many Logitech 
devices didn't probe properly, because of the race where the first IRQ is 
dropped on the floor (after hid_device_io_start() happens, but before the 
50ms timeout passess), and report descriptor never gets parsed and 
populated.

As this is just a boot time micro-optimization, I am going to revert the 
patch for 5.9 now, and we can try to fix this properly for next merge 
window.

Thanks,

-- 
Jiri Kosina
SUSE Labs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help