linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <felipe.balbi@linux.intel.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Linux USB <linux-usb@vger.kernel.org>
Cc: John Youn <John.Youn@synopsys.com>
Subject: [RFT/PATCH,18/38] usb: dwc3: gadget: check for Missed Isoc from event status
Date: Tue, 10 Apr 2018 10:35:18 +0300	[thread overview]
Message-ID: <87o9irldjd.fsf@linux.intel.com> (raw)

Hi,

Thinh Nguyen <Thinh.Nguyen@synopsys.com> writes:
> Hi Felipe,
>
> On 4/9/2018 4:28 AM, Felipe Balbi wrote:
>> In case we get an event with status set to Missed Isoc, this means we
>> have missed an isochronous interval and should issue End Transfer
>> command and wait for the following XferNotReady.
>
> Why does DWC3 need to issue End Transfer if there are still queued requests?

Without XferNotReady, we won't have a reliable way to know the uFrame
number. Read the Isochronous programming sequence from your databook.

>> @@ -2383,14 +2380,25 @@ static void dwc3_gadget_endpoint_transfer_in_progress(struct dwc3_ep *dep,
>>   {
>>   	struct dwc3		*dwc = dep->dwc;
>>   	unsigned		status = 0;
>> +	bool			stop = false;
>>   
>>   	dwc3_gadget_endpoint_frame_from_event(dep, event);
>>   
>>   	if (event->status & DEPEVT_STATUS_BUSERR)
>>   		status = -ECONNRESET;
>>   
>> +	if (event->status & DEPEVT_STATUS_MISSED_ISOC) {
>> +		status = -ECONNRESET;
>
> Missed isoc shouldn't cause this error status or if it should return an 
> error status at all. Maybe the status can be -EXDEV, similar to the host 
> side (/Documentation/driver-api/usb/error-codes.rst).

fair enough. I'll change to EXDEV

             reply	other threads:[~2018-04-10  7:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10  7:35 Felipe Balbi [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-04-13  7:08 [RFT/PATCH,18/38] usb: dwc3: gadget: check for Missed Isoc from event status Felipe Balbi
2018-04-13  2:10 Thinh Nguyen
2018-04-12  7:17 Felipe Balbi
2018-04-12  2:54 Thinh Nguyen
2018-04-11  8:20 Felipe Balbi
2018-04-11  7:09 Felipe Balbi
2018-04-11  2:03 Thinh Nguyen
2018-04-10  0:24 Thinh Nguyen
2018-04-09 11:26 Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9irldjd.fsf@linux.intel.com \
    --to=felipe.balbi@linux.intel.com \
    --cc=John.Youn@synopsys.com \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).