@@ -3804,17 +3804,12 @@ static int dwc2_hcd_is_status_changed(struct dwc2_hsotg *hsotg, int port)
38043804int dwc2_hcd_get_frame_number (struct dwc2_hsotg * hsotg )
38053805{
38063806 u32 hfnum = dwc2_readl (hsotg , HFNUM );
3807- u32 hprt0 = dwc2_readl (hsotg , HPRT0 );
38083807
38093808#ifdef DWC2_DEBUG_SOF
38103809 dev_vdbg (hsotg -> dev , "DWC OTG HCD GET FRAME NUMBER %d\n" ,
38113810 (hfnum & HFNUM_FRNUM_MASK ) >> HFNUM_FRNUM_SHIFT );
38123811#endif
3813- /* HS root port counts microframes, not frames */
3814- if ((hprt0 & HPRT0_SPD_MASK ) >> HPRT0_SPD_SHIFT == HPRT0_SPD_HIGH_SPEED )
3815- return (hfnum & HFNUM_FRNUM_MASK ) >> (3 + HFNUM_FRNUM_SHIFT );
3816- else
3817- return (hfnum & HFNUM_FRNUM_MASK ) >> HFNUM_FRNUM_SHIFT ;
3812+ return (hfnum & HFNUM_FRNUM_MASK ) >> HFNUM_FRNUM_SHIFT ;
38183813}
38193814
38203815int dwc2_hcd_get_future_frame_number (struct dwc2_hsotg * hsotg , int us )
@@ -4560,8 +4555,13 @@ static int _dwc2_hcd_resume(struct usb_hcd *hcd)
45604555static int _dwc2_hcd_get_frame_number (struct usb_hcd * hcd )
45614556{
45624557 struct dwc2_hsotg * hsotg = dwc2_hcd_to_hsotg (hcd );
4558+ u32 hprt0 = dwc2_readl (hsotg , HPRT0 );
45634559
4564- return dwc2_hcd_get_frame_number (hsotg );
4560+ /* HS root port counts microframes, not frames */
4561+ if ((hprt0 & HPRT0_SPD_MASK ) >> HPRT0_SPD_SHIFT == HPRT0_SPD_HIGH_SPEED )
4562+ return dwc2_hcd_get_frame_number (hsotg ) >> 3 ;
4563+ else
4564+ return dwc2_hcd_get_frame_number (hsotg );
45654565}
45664566
45674567static void dwc2_dump_urb_info (struct usb_hcd * hcd , struct urb * urb ,
0 commit comments