RE: [PATCH v7 05/10] usb: dwc3: make controller clear transfer resources after complete

From: Anurag Kumar Vulisha
Date: Wed Dec 05 2018 - 14:05:54 EST



HI Felipe,
>-----Original Message-----
>From: Felipe Balbi [mailto:balbi@xxxxxxxxxx]
>Sent: Wednesday, December 05, 2018 2:32 PM
>To: Anurag Kumar Vulisha <anuragku@xxxxxxxxxx>; Greg Kroah-Hartman
><gregkh@xxxxxxxxxxxxxxxxxxx>; Shuah Khan <shuah@xxxxxxxxxx>; Alan Stern
><stern@xxxxxxxxxxxxxxxxxxx>; Johan Hovold <johan@xxxxxxxxxx>; Jaejoong Kim
><climbbb.kim@xxxxxxxxx>; Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>;
>Roger Quadros <rogerq@xxxxxx>; Manu Gautam <mgautam@xxxxxxxxxxxxxx>;
>martin.petersen@xxxxxxxxxx; Bart Van Assche <bvanassche@xxxxxxx>; Mike
>Christie <mchristi@xxxxxxxxxx>; Matthew Wilcox <willy@xxxxxxxxxxxxx>; Colin Ian
>King <colin.king@xxxxxxxxxxxxx>
>Cc: linux-usb@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
>v.anuragkumar@xxxxxxxxx; Thinh Nguyen <thinhn@xxxxxxxxxxxx>; Tejas Joglekar
><tejas.joglekar@xxxxxxxxxxxx>; Ajay Yugalkishore Pandey <APANDEY@xxxxxxxxxx>;
>Anurag Kumar Vulisha <anuragku@xxxxxxxxxx>
>Subject: Re: [PATCH v7 05/10] usb: dwc3: make controller clear transfer resources
>after complete
>
>
>Hi,
>
>Anurag Kumar Vulisha <anurag.kumar.vulisha@xxxxxxxxxx> writes:
>> @@ -2487,6 +2497,11 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
>> }
>>
>> switch (event->endpoint_event) {
>> + case DWC3_DEPEVT_XFERCOMPLETE:
>> + if (!dep->stream_capable)
>> + break;
>> + dep->flags &= ~DWC3_EP_TRANSFER_STARTED;
>> + /* Fall Through */
>
>instead, let's add a proper handler for this:
>
>dwc3_gadget_endpoint_transfer_complete(dep, event);
>
>That handler should be "self-sufficient". IOW, we shouldn't have this
>fall through here. This means that the other patch where you modify
>dwc3_gadget_transfer_in_progress() shouldn't be necessary, since that
>event shouldn't run for stream capable endpoints.
>

Thanks for your suggestion, will implement the changes as said and send
the patches

>While rewriting the patches, please rebase on my testing/next as I have
>applied a few of the patches in this series.

Okay , will rebase on top of testing/next and send the patches

Best Regards,
Anurag Kumar Vulisha