Skip to content

Commit 6199d23

Browse files
hadessJiri Kosina
authored andcommitted
HID: logitech-hidpp: Handle timeout differently from busy
If an attempt at contacting a receiver or a device fails because the receiver or device never responds, don't restart the communication, only restart it if the receiver or device answers that it's busy, as originally intended. This was the behaviour on communication timeout before commit 586e8fe ("HID: logitech-hidpp: Retry commands when device is busy"). This fixes some overly long waits in a critical path on boot, when checking whether the device is connected by getting its HID++ version. Signed-off-by: Bastien Nocera <[email protected]> Suggested-by: Mark Lord <[email protected]> Fixes: 586e8fe ("HID: logitech-hidpp: Retry commands when device is busy") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217412 Signed-off-by: Jiri Kosina <[email protected]>
1 parent 16a9c24 commit 6199d23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/hid/hid-logitech-hidpp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ static int hidpp_send_message_sync(struct hidpp_device *hidpp,
314314
dbg_hid("%s:timeout waiting for response\n", __func__);
315315
memset(response, 0, sizeof(struct hidpp_report));
316316
ret = -ETIMEDOUT;
317+
goto exit;
317318
}
318319

319320
if (response->report_id == REPORT_ID_HIDPP_SHORT &&

0 commit comments

Comments
 (0)