* [2/2] usb: dwc3: gadget: Report isoc scheduled frame number
@ 2018-11-08 2:24 Thinh Nguyen
0 siblings, 0 replies; 2+ messages in thread
From: Thinh Nguyen @ 2018-11-08 2:24 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman, linux-usb; +Cc: John Youn, Thinh Nguyen
Report the scheduled frame number of an isochronous request.
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
---
drivers/usb/dwc3/gadget.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 679c12e14522..34540b661592 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -2254,6 +2254,10 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
if (chain && (trb->ctrl & DWC3_TRB_CTRL_HWO))
trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
+ /* Report scheduled frame number for isoc transfers */
+ if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
+ req->request.start_frame = dep->frame_number;
+
/*
* If we're dealing with unaligned size OUT transfer, we will be left
* with one TRB pending in the ring. We need to manually clear HWO bit
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [2/2] usb: dwc3: gadget: Report isoc scheduled frame number
@ 2018-11-08 7:06 Felipe Balbi
0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2018-11-08 7:06 UTC (permalink / raw)
To: Thinh Nguyen, Greg Kroah-Hartman, linux-usb; +Cc: John Youn
Hi,
Thinh Nguyen <thinh.nguyen@synopsys.com> writes:
> Report the scheduled frame number of an isochronous request.
>
> Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
> ---
> drivers/usb/dwc3/gadget.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 679c12e14522..34540b661592 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -2254,6 +2254,10 @@ static int dwc3_gadget_ep_reclaim_completed_trb(struct dwc3_ep *dep,
> if (chain && (trb->ctrl & DWC3_TRB_CTRL_HWO))
> trb->ctrl &= ~DWC3_TRB_CTRL_HWO;
>
> + /* Report scheduled frame number for isoc transfers */
> + if (usb_endpoint_xfer_isoc(dep->endpoint.desc))
> + req->request.start_frame = dep->frame_number;
This doesn't work. It'll work fine for the very first TRB. But since we
use Update Transfer to add more intervals, I can see that this could
lead to wrong frame numbers being reported, no?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-08 7:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-08 7:06 [2/2] usb: dwc3: gadget: Report isoc scheduled frame number Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2018-11-08 2:24 Thinh Nguyen
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).