aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/hcd_queue.c
diff options
context:
space:
mode:
authorGregory Herrero <[email protected]>2015-09-22 13:16:52 +0000
committerFelipe Balbi <[email protected]>2015-10-01 17:40:18 +0000
commitdd81dd7c8178c430040dc98c8144d4998ba2f7fb (patch)
treee3dcd0a3c17a002e9056813c1e56b477f39355e5 /drivers/usb/dwc2/hcd_queue.c
parentusb: dwc2: host: correctly dump urb isochronous descriptors (diff)
downloadkernel-dd81dd7c8178c430040dc98c8144d4998ba2f7fb.tar.gz
kernel-dd81dd7c8178c430040dc98c8144d4998ba2f7fb.zip
usb: dwc2: host: use correct frame number during qh init
On first qh initialization, hsotg->frame_number is not corresponding to reality. So read it from host controller to get correct value. Signed-off-by: Gregory Herrero <[email protected]> Signed-off-by: Mian Yousaf Kaukab <[email protected]> Tested-by: Robert Baldyga <[email protected]> Tested-by: Dinh Nguyen <[email protected]> Tested-by: John Youn <[email protected]> Acked-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'drivers/usb/dwc2/hcd_queue.c')
-rw-r--r--drivers/usb/dwc2/hcd_queue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c
index 801bd9d9c4bd..7d8d06cfe3c1 100644
--- a/drivers/usb/dwc2/hcd_queue.c
+++ b/drivers/usb/dwc2/hcd_queue.c
@@ -106,6 +106,9 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, struct dwc2_qh *qh,
USB_SPEED_HIGH : dev_speed, qh->ep_is_in,
qh->ep_type == USB_ENDPOINT_XFER_ISOC,
bytecount));
+
+ /* Ensure frame_number corresponds to the reality */
+ hsotg->frame_number = dwc2_hcd_get_frame_number(hsotg);
/* Start in a slightly future (micro)frame */
qh->sched_frame = dwc2_frame_num_inc(hsotg->frame_number,
SCHEDULE_SLOP);