@@ -3804,17 +3804,12 @@ static int dwc2_hcd_is_status_changed(struct dwc2_hsotg *hsotg, int port)
3804
3804
int dwc2_hcd_get_frame_number (struct dwc2_hsotg * hsotg )
3805
3805
{
3806
3806
u32 hfnum = dwc2_readl (hsotg , HFNUM );
3807
- u32 hprt0 = dwc2_readl (hsotg , HPRT0 );
3808
3807
3809
3808
#ifdef DWC2_DEBUG_SOF
3810
3809
dev_vdbg (hsotg -> dev , "DWC OTG HCD GET FRAME NUMBER %d\n" ,
3811
3810
(hfnum & HFNUM_FRNUM_MASK ) >> HFNUM_FRNUM_SHIFT );
3812
3811
#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 ;
3818
3813
}
3819
3814
3820
3815
int 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)
4560
4555
static int _dwc2_hcd_get_frame_number (struct usb_hcd * hcd )
4561
4556
{
4562
4557
struct dwc2_hsotg * hsotg = dwc2_hcd_to_hsotg (hcd );
4558
+ u32 hprt0 = dwc2_readl (hsotg , HPRT0 );
4563
4559
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 );
4565
4565
}
4566
4566
4567
4567
static void dwc2_dump_urb_info (struct usb_hcd * hcd , struct urb * urb ,
0 commit comments