dwc3: gadget: Handle usb2 phy autosuspend functionality with gadget event
Current code put usb2 phy into autosuspend mode and poll for IN_L2
pwr_event to be set while putting device into LPM on receiving SUSPEND
event. There is a possible race that arises when gadget events are
processed before the resume routine has disabled the USB2 PHY autosuspend.
Some of the gadget events issue endpoint commands which may time out since
the PHY is still autosuspended. Fix this issue by using available check
where it calls dwc3_gadget_usb2_phy_suspend() API to disable usb2 phy
autosuspend, and ignore hsphy_auto_suspend_disable platform specific
variable.
Also add error messages where this failure case is checked.
CRs-Fixed: 680990
Change-Id: Iebc48e10ea5bc9f90e17ad21f0fec620f5c57211
Signed-off-by:
Mayank Rana <mrana@codeaurora.org>
Loading
Please register or sign in to comment