[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN3PR0201MB0993768965D7E7C08B33E4FFA7020@BN3PR0201MB0993.namprd02.prod.outlook.com>
Date: Wed, 5 Sep 2018 09:21:33 +0000
From: Anurag Kumar Vulisha <anuragku@...inx.com>
To: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
"balbi@...nel.org" <balbi@...nel.org>,
"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: "v.anuragkumar@...il.com" <v.anuragkumar@...il.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2 3/8] usb: dwc3: make controller clear transfer
resources after complete
Hi Thinh,
>> + * To issue start transfer on another stream, controller need to free
>> + * previously acquired transfer resource. Setting the LST bit in
>> + * last TRB makes the controller clear transfer resource for that
>> + * endpoint, allowing to start another stream on that endpoint.
>> + */
>> + else if (dep->stream_capable)
>> + trb->ctrl |= DWC3_TRB_CTRL_LST;
>> +
>> if (usb_endpoint_xfer_bulk(dep->endpoint.desc) && dep->stream_capable)
>> trb->ctrl |= DWC3_TRB_CTRL_SID_SOFN(stream_id);
>>
>> @@ -2268,7 +2278,7 @@ static int
>dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
>> if (event->status & DEPEVT_STATUS_SHORT && !chain)
>> return 1;
>>
>> - if (event->status & DEPEVT_STATUS_IOC)
>> + if (event->status & (DEPEVT_STATUS_IOC | DEPEVT_STATUS_LST))
>> return 1;
>>
>> return 0;
>> @@ -2457,6 +2467,10 @@ 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;
> Add this: /* Falls Through */
Thanks for correcting, will fix it in the next version of patch
Thanks,
Anurag Kumar Vulisha
>> case DWC3_DEPEVT_XFERINPROGRESS:
>> dwc3_gadget_endpoint_transfer_in_progress(dep, event);
>> break;
>> @@ -2472,7 +2486,6 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
>> }
>> break;
>> case DWC3_DEPEVT_STREAMEVT:
>> - case DWC3_DEPEVT_XFERCOMPLETE:
>> case DWC3_DEPEVT_RXTXFIFOEVT:
>> break;
>> }
>
>Thinh
Powered by blists - more mailing lists