All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Angelo Dureghello <angelo@kernel-space.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: testusb: epipe errors on test 9 and 10
Date: Tue, 2 Dec 2025 04:23:13 +0000	[thread overview]
Message-ID: <20251202042305.wl2uvxoe55ay5vxw@synopsys.com> (raw)
In-Reply-To: <82bc662b-70c6-46f8-acc7-3a666965d13e@rowland.harvard.edu>

On Mon, Dec 01, 2025, Alan Stern wrote:
> On Mon, Dec 01, 2025 at 11:29:14PM +0000, Thinh Nguyen wrote:
> > On Fri, Nov 28, 2025, Alan Stern wrote:
> > > This was wrong; I had forgotten that Get-Status requests are mostly 
> > > handled by the UDC driver, not by the gadget drivers.  In your case, I 
> > > guess that's dwc3?
> > > 
> > > In the current kernel, these requests are handled in 
> > > drivers/usb/dwc3/ep0.c:dwc3_ep0_handle_status().  The problem is that 
> > > this routine doesn't handle Get-Interface-Status requests at all; 
> > > instead it passes them through to the composite core, which doesn't 
> > > handle many of them either.  Other UDC drivers do a better job.
> > > 
> > > Fixing this should be pretty easy, but I'm not not an expert on dwc3.
> > > The maintainer, Thinh Nguyen, will know what to do.
> > > 
> > 
> > This is a known issue. Often, hosts don't send ClearFeature(halt_ep)
> > unless there's a problem with a transfer. Back then, I had implemented
> > such that ClearFeature request would trigger a dequeue outstanding
> > requests from dwc3. It was to inter-op with Windows drivers for their
> > handling of transaction errors. This was the wrong way to go about it. I
> > recall after discussion with Alan and reviewing further that the
> > recovery mechanism Windows UASP driver uses was forcing an overlapping
> > command failure to trigger the function driver to dequeue requests (not
> > coming from ClearFeature and dwc3).
> 
> Are we talking about the same thing?  Clear-Feature is different from 
> Get-Interface-Status.
> 

Ah... I just saw the subject line testusb -EPIPE and assumed that it's
related to ClearFeature(halt_ep)..

The Get-Interface-Status should be hand-off and handled by gzero right?
The gadget driver knows about the status of the interface, not UDC
driver.

BR,
Thinh

  reply	other threads:[~2025-12-02  4:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-27  8:06 testusb: epipe errors on test 9 and 10 Angelo Dureghello
2025-11-27  8:22 ` Greg KH
2025-11-27 12:53   ` Angelo Dureghello
2025-11-27 13:21     ` Greg KH
2025-11-28  3:23 ` Alan Stern
2025-11-28 14:20   ` Angelo Dureghello
2025-11-28 15:20     ` Alan Stern
2025-11-28 16:10       ` Alan Stern
2025-11-28 21:21         ` Angelo Dureghello
2025-12-01 23:29         ` Thinh Nguyen
2025-12-02  3:09           ` Alan Stern
2025-12-02  4:23             ` Thinh Nguyen [this message]
2025-12-02 16:25               ` Alan Stern
2025-12-02 23:22                 ` Thinh Nguyen
2025-12-04 22:26                   ` Alan Stern
2025-12-10 14:20                     ` Angelo Dureghello

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=20251202042305.wl2uvxoe55ay5vxw@synopsys.com \
    --to=thinh.nguyen@synopsys.com \
    --cc=angelo@kernel-space.org \
    --cc=linux-usb@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.