Re: [PATCH] usb: dwc3: gadget: Fix controller get stuck when kicking extra transfer in wrong case

From: Felipe Balbi
Date: Thu Jan 09 2020 - 04:04:41 EST



Hi,

(Tejas, please break your lines at 80-columns. You shouldn't have to be
reminded of this)

Tejas Joglekar <Tejas.Joglekar@xxxxxxxxxxxx> writes:

> Hi,
> On 1/7/2020 12:44 PM, Ran Wang wrote:
>> According to original commit c96e6725db9d6a ("usb: dwc3: gadget: Correct the
>> logic for queuing sgs"), we would only kick off another transfer in case of
>> req->num_pending_sgs > 0.
>>
> The commit 8c7d4b7b3d43 ("usb: dwc3: gadget: Fix logical condition")
> fixes the commit f38e35dd84e2 (usb: dwc3: gadget: split
> dwc3_gadget_ep_cleanup_completed_requests()).
>
>> However, current logic will do this as long as req->remaining > 0, this will
>> include the case of non-sgs (both dwc3_gadget_ep_request_completed(req) and
>> req->num_pending_sgs are 0) that we did not want to.
>>
>> Without this fix, we observed dwc3 got stuck on Layerscape plaftorms (such as
>> LS1088ARDB) when enabling gadget (mass storage function) as below:
>>
> Similar issue was reported by Thinh after my fix, and he has submitted
> a patch for the same. You can refer the discussion
> https://patchwork.kernel.org/patch/11292087/.

Based on this, I'm assuming we don't need this patch.

--
balbi

Attachment: signature.asc
Description: PGP signature