47 lines
1.5 KiB
Diff
47 lines
1.5 KiB
Diff
|
From 48dac4e4a5eed3fa478db2c59945b6283281566d Mon Sep 17 00:00:00 2001
|
||
|
From: Grigor Tovmasyan <Grigor.Tovmasyan@synopsys.com>
|
||
|
Date: Wed, 29 Aug 2018 21:00:33 +0400
|
||
|
Subject: [PATCH 09/53] usb: dwc2: Update target (u)frame calculation
|
||
|
|
||
|
In service interval based scheduling target (u)frame must be
|
||
|
set as a last frame in this the service interval.
|
||
|
|
||
|
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
|
||
|
Signed-off-by: Grigor Tovmasyan <tovmasya@synopsys.com>
|
||
|
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
|
||
|
---
|
||
|
drivers/usb/dwc2/gadget.c | 17 +++++++++++++++++
|
||
|
1 file changed, 17 insertions(+)
|
||
|
|
||
|
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
|
||
|
index 71f097d89001..9de16453a890 100644
|
||
|
--- a/drivers/usb/dwc2/gadget.c
|
||
|
+++ b/drivers/usb/dwc2/gadget.c
|
||
|
@@ -2830,6 +2830,23 @@ static void dwc2_gadget_handle_nak(struct dwc2_hsotg_ep *hs_ep)
|
||
|
if (using_desc_dma(hsotg)) {
|
||
|
hs_ep->target_frame = hsotg->frame_number;
|
||
|
dwc2_gadget_incr_frame_num(hs_ep);
|
||
|
+
|
||
|
+ /* In service interval mode target_frame must
|
||
|
+ * be set to last (u)frame of the service interval.
|
||
|
+ */
|
||
|
+ if (hsotg->params.service_interval) {
|
||
|
+ /* Set target_frame to the first (u)frame of
|
||
|
+ * the service interval
|
||
|
+ */
|
||
|
+ hs_ep->target_frame &= ~hs_ep->interval + 1;
|
||
|
+
|
||
|
+ /* Set target_frame to the last (u)frame of
|
||
|
+ * the service interval
|
||
|
+ */
|
||
|
+ dwc2_gadget_incr_frame_num(hs_ep);
|
||
|
+ dwc2_gadget_dec_frame_num_by_one(hs_ep);
|
||
|
+ }
|
||
|
+
|
||
|
dwc2_gadget_start_isoc_ddma(hs_ep);
|
||
|
return;
|
||
|
}
|
||
|
--
|
||
|
2.11.0
|
||
|
|