From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"stern@rowland.harvard.edu" <stern@rowland.harvard.edu>,
"michal.pecio@gmail.com" <michal.pecio@gmail.com>,
"oneukum@suse.com" <oneukum@suse.com>,
"niklas.neronin@linux.intel.com" <niklas.neronin@linux.intel.com>
Subject: Re: [RFC PATCH 1/2] xhci: prevent automatic endpoint restart after stall or error
Date: Wed, 1 Apr 2026 22:47:52 +0000 [thread overview]
Message-ID: <20260401224749.x6kdrkap3n7xqyy7@synopsys.com> (raw)
In-Reply-To: <aa2f5418-5070-403a-8fcf-ed6169662e9e@linux.intel.com>
On Thu, Apr 02, 2026, Mathias Nyman wrote:
> On 4/2/26 01:08, Thinh Nguyen wrote:
> > On Mon, Mar 30, 2026, Mathias Nyman wrote:
> > >
> > > >
> > > > On a separate note, will you plan to implement the clear-halt for EPROTO
> > > > in xhci?
> > >
> > > I don't think this should be part of xhci driver. Decision to send control requests
> > > to the device should be done by core or class drivers.
> > >
> >
> > This not like STALL where it's standardized for the core or class driver
> > to know how to handle. The programming sequence for the errors that
> > resulted in EPROTO from xhci is specific to xhci. That is, the xhci
> > reset endpoint command will reset the bulk sequence, it's specific to
> > xhci. The xhci spec recommends to send a clear-halt for this scenario,
> > not the USB spec or any other class specific spec. So we should not
> > delegate this to the core or class driver to handle.
> >
> USB 2 Specification does mention handling halt conditions due to transmission
> erros _OR_ STALL handshake with clearing halt and resetting both host and device
> endpoint toggle.
>
> See USB 2
>
> 5.7.5 Interrupt Transfer Data Sequences
>
> "If a halt condition is detected on an interrupt pipe due to transmission errors or
> a STALL handshake being returned from the endpoint, all pending IRPs are retired.
> Removal of the halt condition is achieved via software intervention through a
> separate control pipe. This recovery will reset the data toggle bit to DATA0 for
> the endpoint on both the host and the device"
>
> 5.8.5 Bulk Transfer Data Sequences
>
> "If a halt condition is detected on a bulk pipe due to transmission errors or a
> STALL handshake being returned from the endpoint, all pending IRPs are retired.
> Removal of the halt condition is achieved via software intervention through a
> separate control pipe. This recovery will reset the data toggle bit to DATA0
> for the endpoint on both the host and the device"
>
Ah~ I stand corrected. My memory served me wrong. Thanks for pointing
this out.
BR,
Thinh
next prev parent reply other threads:[~2026-04-01 22:48 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 12:25 [RFC PATCH 0/2] fix xhci endpoint restart at EPROTO Mathias Nyman
2026-03-23 12:25 ` [RFC PATCH 1/2] xhci: prevent automatic endpoint restart after stall or error Mathias Nyman
2026-03-25 1:52 ` Thinh Nguyen
2026-03-25 9:38 ` Mathias Nyman
2026-03-26 1:19 ` Thinh Nguyen
2026-03-26 11:25 ` Mathias Nyman
2026-03-26 23:24 ` Thinh Nguyen
2026-03-30 12:51 ` Mathias Nyman
2026-03-30 14:17 ` stern
2026-03-31 9:34 ` Mathias Nyman
2026-03-31 15:31 ` stern
2026-04-01 22:08 ` Mathias Nyman
2026-04-02 2:36 ` stern
2026-04-03 1:59 ` Thinh Nguyen
2026-04-03 2:42 ` stern
2026-04-03 8:51 ` Michal Pecio
2026-04-03 14:55 ` stern
2026-04-03 19:13 ` xhci-hcd and URB_SHORT_NOT_OK Michal Pecio
2026-04-03 20:17 ` stern
2026-04-04 1:15 ` [RFC PATCH 1/2] xhci: prevent automatic endpoint restart after stall or error Thinh Nguyen
2026-04-04 1:54 ` stern
2026-04-04 20:41 ` Thinh Nguyen
2026-04-04 21:54 ` Alan Stern
2026-04-04 22:15 ` Thinh Nguyen
2026-04-04 22:28 ` Thinh Nguyen
2026-04-05 1:30 ` Alan Stern
2026-04-05 3:10 ` Thinh Nguyen
2026-04-07 15:23 ` Alan Stern
2026-04-07 20:24 ` Mathias Nyman
2026-04-01 22:08 ` Thinh Nguyen
2026-04-01 22:34 ` Mathias Nyman
2026-04-01 22:47 ` Thinh Nguyen [this message]
2026-03-23 12:25 ` [RFC PATCH 2/2] xhci: Ensure URB is given back when endpoint halts on a multi-TD URB Mathias Nyman
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=20260401224749.x6kdrkap3n7xqyy7@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=michal.pecio@gmail.com \
--cc=niklas.neronin@linux.intel.com \
--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