[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BN3PR0201MB099343BF037A62CD036CD4BDA7020@BN3PR0201MB0993.namprd02.prod.outlook.com>
Date: Wed, 5 Sep 2018 09:24:14 +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 4/8] usb: dwc3: implement stream transfer timeout
Hi Thinh,
>dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
>> stop = true;
>> }
>>
>> + /*
>> + * Delete the timer that was started in __dwc3_gadget_kick_transfer()
>> + * for stream capable endpoints.
>> + */
>> + if (dep->stream_capable)
>> + del_timer(&dep->stream_timeout_timer);
>> +
>> dwc3_gadget_ep_cleanup_completed_requests(dep, event, status);
>>
>> if (stop) {
>> @@ -2486,6 +2505,14 @@ static void dwc3_endpoint_interrupt(struct dwc3 *dwc,
>> }
>> break;
>> case DWC3_DEPEVT_STREAMEVT:
>> + switch (event->status) {
>> + case DEPEVT_STREAMEVT_FOUND:
>> + del_timer(&dep->stream_timeout_timer);
>> + break;
>> + case DEPEVT_STREAMEVT_NOTFOUND:
>> + default:
>> + dev_err(dwc->dev, "unable to find suitable stream");
>> + }
>Add break after this. Also, it's probably easier to read if we use if-else case here.
>
Thanks for correcting the code, will fix it in next series of patch
Thanks,
Anurag Kumar Vulisha
>> case DWC3_DEPEVT_RXTXFIFOEVT:
>> break;
>> }
>> @@ -2587,6 +2614,18 @@ static void dwc3_stop_active_transfer(struct dwc3_ep
>*dep, bool force)
>> }
>> }
>>
>> +static void stream_timeout_function(struct timer_list *arg) {
>> + struct dwc3_ep *dep = from_timer(dep, arg, stream_timeout_timer);
>> + struct dwc3 *dwc = dep->dwc;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&dwc->lock, flags);
>> + dwc3_stop_active_transfer(dep, true);
>> + __dwc3_gadget_kick_transfer(dep);
>> + spin_unlock_irqrestore(&dwc->lock, flags); }
>> +
>> static void dwc3_clear_stall_all_ep(struct dwc3 *dwc) {
>> u32 epnum;
>
>Thinh
Powered by blists - more mailing lists