From: Lauri Jakku <ljakku77@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>, Lauri Jakku <lja@iki.fi>
Cc: oneukum@suse.com, benjamin.tissoires@redhat.com,
jikos@kernel.org, linux-input@vger.kernel.org,
gregkh@linuxfoundation.org, linux-usb@vger.kernel.org
Subject: Re: [PATCH v5] USB: HID: random timeout failures tackle try.
Date: Tue, 4 Feb 2020 22:14:06 +0200 [thread overview]
Message-ID: <1d94d306-396a-3576-c70c-7d60f255e864@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.2002041306100.1587-100000@iolanthe.rowland.org>
Hi,
Inline reply.
On 4.2.2020 20.07, Alan Stern wrote:
> On Tue, 4 Feb 2020, Lauri Jakku wrote:
>
>> -- v1 ------------------------------------------------------------
>> send, 20ms apart, control messages, if error is timeout.
>>
>> There is multiple reports of random behaviour of USB HID devices.
>>
>> I have mouse that acts sometimes quite randomly, I debugged with
>> logs others have published that there is HW timeouts that leave
>> device in state that it is errorneus.
>>
>> To fix this I introduced retry mechanism in root of USB HID drivers.
>>
>> Fix does not slow down operations at all if there is no -ETIMEDOUT
>> got from control message sending. If there is one, then sleep 20ms
>> and try again. Retry count is 20 witch translates maximium of 400ms
>> before giving up.
>>
>> NOTE: This does not sleep anymore then before, if all is golden.
>>
>> -- v2 ------------------------------------------------------------
>>
>> If there is timeout, then sleep 20ms and try again. Retry count is 20
>> witch translates maximium of 400ms before giving up. If the 400ms
>> boundary is reached the HW is really bad.
>>
>> JUST to be clear:
>> This does not make USB HID devices to sleep anymore than
>> before, if all is golden.
>>
>> Why modify usb-hid-core: No need to modify driver by driver.
> Please note: Your patch does _not_ modify usb-hid-core (that is,
> drivers/hid/usbhid). It modifies usb-core (that is, drivers/usb/core).
>
> Alan Stern
Uh, sorry about that misleading commit message, i'll fix it in next version.
Thank you for pointing that out :)
Br,
Lauri J.
next prev parent reply other threads:[~2020-02-04 20:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-04 17:52 [PATCH v5] USB: HID: random timeout failures tackle try Lauri Jakku
2020-02-04 18:07 ` Alan Stern
2020-02-04 20:14 ` Lauri Jakku [this message]
2020-02-04 18:11 ` Greg KH
2020-02-04 18:15 ` Greg KH
2020-02-04 20:05 ` Lauri Jakku
2020-02-05 10:03 ` Oliver Neukum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1d94d306-396a-3576-c70c-7d60f255e864@gmail.com \
--to=ljakku77@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lja@iki.fi \
--cc=oneukum@suse.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).