PrawnOS-nonfree/resources/BuildResources/patches-tested/kernel/5.x-dwc2/0040-usb-dwc2-Set-actual-frame-number-for-completed-ISOC-.patch

37 lines
1.2 KiB
Diff
Raw Normal View History

From c8006f67ae0371900e601112d9f9cd8fff1c8387 Mon Sep 17 00:00:00 2001
From: Minas Harutyunyan <minas.harutyunyan@synopsys.com>
Date: Tue, 12 Mar 2019 13:27:46 +0400
Subject: [PATCH 40/53] usb: dwc2: Set actual frame number for completed ISOC
transfer
On ISOC transfer completion, in DDMA mode, set actual frame
number returning to function driver in usb_request.
Due to core limitation, returning frame number is 11-bit wide.
Signed-off-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
---
drivers/usb/dwc2/gadget.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
index fafd9cc9c8b2..a17e444e467b 100644
--- a/drivers/usb/dwc2/gadget.c
+++ b/drivers/usb/dwc2/gadget.c
@@ -2166,6 +2166,11 @@ static void dwc2_gadget_complete_isoc_request_ddma(struct dwc2_hsotg_ep *hs_ep)
*/
if (!hs_ep->dir_in && ureq->length & 0x3)
ureq->actual += 4 - (ureq->length & 0x3);
+
+ /* Set actual frame number for completed transfers */
+ ureq->frame_number =
+ (desc_sts & DEV_DMA_ISOC_FRNUM_MASK) >>
+ DEV_DMA_ISOC_FRNUM_SHIFT;
}
dwc2_hsotg_complete_request(hsotg, hs_ep, hs_req, 0);
--
2.11.0