Commit fca4978d authored by Selvarasu Ganesan's avatar Selvarasu Ganesan Committed by Treehugger Robot
Browse files

UPSTREAM: usb: dwc3: Fix timeout issue during controller enter/exit from halt state



There is a frequent timeout during controller enter/exit from halt state
after toggling the run_stop bit by SW. This timeout occurs when
performing frequent role switches between host and device, causing
device enumeration issues due to the timeout. This issue was not present
when USB2 suspend PHY was disabled by passing the SNPS quirks
(snps,dis_u2_susphy_quirk and snps,dis_enblslpm_quirk) from the DTS.
However, there is a requirement to enable USB2 suspend PHY by setting of
GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY bits when controller starts
in gadget or host mode results in the timeout issue.

This commit addresses this timeout issue by ensuring that the bits
GUSB2PHYCFG.ENBLSLPM and GUSB2PHYCFG.SUSPHY are cleared before starting
the dwc3_gadget_run_stop sequence and restoring them after the
dwc3_gadget_run_stop sequence is completed.

Fixes: 72246da4 ("usb: Introduce DesignWare USB3 DRD Driver")
Cc: stable <stable@kernel.org>
Change-Id: I49ccfc53dae73a43717d0e484df6aa6ae125e25b
Signed-off-by: default avatarSelvarasu Ganesan <selvarasu.g@samsung.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20250201163903.459-1-selvarasu.g@samsung.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 410704198
(cherry picked from commit d3a8c284
https: //git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/?h=v6.14-rc3)
Change-Id: I2cade93259003e4d7e5781750ad49854921abe66
Signed-off-by: default avatarshijie.cai <shijie.cai@samsung.com>
parent b00a7c5d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment