summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMinas Harutyunyan <minas.harutyunyan@synopsys.com>2019-03-12 13:27:46 +0400
committerFelipe Balbi <felipe.balbi@linux.intel.com>2019-05-03 09:13:48 +0300
commitc8006f67ae0371900e601112d9f9cd8fff1c8387 (patch)
tree2c578d5d7431392e2a7a71dc4901f009baad31df /drivers
parent0c91ca478909d1d755b852970519126107478bfb (diff)
downloadlinux-stable-c8006f67ae0371900e601112d9f9cd8fff1c8387.tar.gz
linux-stable-c8006f67ae0371900e601112d9f9cd8fff1c8387.tar.bz2
linux-stable-c8006f67ae0371900e601112d9f9cd8fff1c8387.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/dwc2/gadget.c5
1 files changed, 5 insertions, 0 deletions
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);