From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Felipe Balbi <felipe.balbi@linux.intel.com>,
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: Wed, 11 Apr 2018 02:03:01 +0000 [thread overview]
Message-ID: <30102591E157244384E984126FC3CB4F3011EB22@us01wembx1.internal.synopsys.com> (raw)
Hi,
On 4/10/2018 12:36 AM, Felipe Balbi wrote:
>
> 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.
Right. We need XferNotReady to know when to start isoc transfer. But if
there are still queued requests, DWC3 can just wait to see if any of
them will succeed to continue with the transfer just as how DWC3 is
handling it now. If we end and restart the transfer right away, then we
may lose more isoc data than necessary (due to isoc scheduling at least
4 uFrame ahead of time). Is there something you see that doesn't work
with the current implementation?
>
>>> @@ -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
>
BR,
Thinh
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2018-04-11 2:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-11 2:03 Thinh Nguyen [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-10 7:35 Felipe Balbi
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=30102591E157244384E984126FC3CB4F3011EB22@us01wembx1.internal.synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=John.Youn@synopsys.com \
--cc=felipe.balbi@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.