From: Alan Stern <stern@rowland.harvard.edu>
To: Liam Mitchell <mitchell.liam@gmail.com>
Cc: Jiri Kosina <jikos@kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Oliver Neukum <oneukum@suse.com>,
linux-usb@vger.kernel.org, linux-input@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] usbhid: tolerate intermittent errors
Date: Sat, 7 Mar 2026 17:52:54 -0500 [thread overview]
Message-ID: <6cbc6c70-8252-43d0-8701-e1613ddc769f@rowland.harvard.edu> (raw)
In-Reply-To: <20260307-usbhid-eproto-v2-1-e5a8abce4652@gmail.com>
On Sat, Mar 07, 2026 at 07:57:09PM +0100, Liam Mitchell wrote:
> Modifies usbhid error handling to tolerate intermittent protocol
> errors, avoiding URB resubmission delay and device reset.
>
> ---
> Protocol errors like EPROTO can occur randomly, sometimes frequently and are often not fixed by a device reset.
>
> The current error handling will only resubmit the URB after at least 13ms delay and may reset the USB device if another error occurs 1-1.5s later, regardless of error type or count.
>
> These delays and device resets increase the chance that input events will be missed and that users see symptoms like missed or sticky keyboard keys.
>
> This patch allows one protocol error per 500ms to be tolerated and have the URB re-submitted immediately.
>
> 500ms was chosen to be well above the error rate of a malfunctioning
> device but low enough to be useful for users with devices noisier than
> mine.
>
> Signed-off-by: Liam Mitchell <mitchell.liam@gmail.com>
> Link: https://lore.kernel.org/linux-input/CAOQ1CL6Q+4GNy=kgisLzs0UBXFT3b02PG8t-0rPuW-Wf6NhQ6g@mail.gmail.com/
> ---
Liam, take a look at
https://bugzilla.kernel.org/show_bug.cgi?id=221184
On Roman's system, these protocol errors occur fairly regularly,
apparently caused by high system load.
Do you think a better approach might be to reduce the 13-ms delay to
just 1 or 2 ms, and perform a reset only there has been no successful
communication for about one second? This might perhaps be _too_ lenient
sometimes, but I don't think such situations will arise in practice.
The reason for having at least a small delay is to avoid getting into a
tight resubmit/error loop in cases where the device has been unplugged.
Alan Stern
next prev parent reply other threads:[~2026-03-07 22:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-07 18:57 Liam Mitchell
2026-03-07 22:52 ` Alan Stern [this message]
2026-03-08 13:48 ` Liam Mitchell
2026-03-08 15:19 ` Alan Stern
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=6cbc6c70-8252-43d0-8701-e1613ddc769f@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mitchell.liam@gmail.com \
--cc=oneukum@suse.com \
/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
all inboxes | Powered by JetHome®