Re: [PATCH] usb: dwc3: gadget: Stall and restart EP0 if host is unresponsive
From: Thinh Nguyen
Date: Tue Apr 04 2023 - 18:17:11 EST
On Tue, Apr 04, 2023, Wesley Cheng wrote:
> Hi Thinh,
>
> On 4/3/2023 6:11 PM, Thinh Nguyen wrote:
> > On Fri, Mar 31, 2023, Wesley Cheng wrote:
> > > It was observed that there are hosts that may complete pending SETUP
> > > transactions before the stop active transfers and controller halt occurs,
> > > leading to lingering endxfer commands on DEPs on subsequent pullup/gadget
> > > start iterations.
> >
> > Can you clarify this a bit further? Even though the controller is
> > halted, you still observed activity?
> >
>
> Yes...I didn't understand how that was possible either, but traces clearly
> showed that the controller halt was successful even though there were no
> endxfers issued on some EPs. Although, I can't say for certain if those EPs
> were actively being used at that time.
>
The controller should only be halted after the (non-ep0) endpoints are
disabled.
"even though there were no endxferx issued on some EPs", which EPs are
you referring to? If there's no End Transfer issued while the endpoints
are active and started during disconnect, we need to fix that in the
driver.
Thanks,
Thinh