diff options
| author | Hans de Goede <johannes.goede@oss.qualcomm.com> | 2025-11-08 22:03:19 +0100 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2025-11-26 16:16:34 +0100 |
| commit | 36dcfa468525336fc33cfa88f2a5514fc9cc0666 (patch) | |
| tree | ddb40554d11ed4136562d6a1862a19089f489c0c /tools/lib/python | |
| parent | ca389a55d8b2d86a817433bf82e0602b68c4d541 (diff) | |
HID: logitech-dj: Fix probe failure when used with KVM
Since commit 6f20d3261265 ("HID: logitech-dj: Fix error handling in
logi_dj_recv_switch_to_dj_mode()") logi_dj_recv_switch_to_dj_mode()
will return an error when the hid_hw_raw_request() call to enable
[dis]connect events fails.
This can happen when used with a KVM like the Aten CS1784a and the PC
does not have the KVM focus when probe() runs, which causes probe() to
fail after which the receiver will simply not work.
The logi_dj_recv_query_paired_devices() call done at the end of probe()
already ignores any errors for the KVM without focus case. When focus is
restored and an input report is received this will trigger
logi_dj_recv_queue_unknown_work() which retries the query_paired_devices()
call from a workqueue.
To fix the probe() failure let it ignore logi_dj_recv_switch_to_dj_mode()
errors too, track if a successful logi_dj_recv_switch_to_dj_mode() was
done and retry if necessary from logi_dj_recv_queue_unknown_work().
Queurying paired devices while not in dj-mode is not useful and this
will be redone after the unknown work has retried setting dj-mode,
so skip queurying paired devices when not in dj-mode yet.
The new bool to track successful setting of the dj-mode will also cause
setting dj-mode to be retried from the unknown work, if setting dj-mode
failed after a reset_resume.
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
