WSL2-Linux-Kernel/drivers/usb/dwc3
Thinh Nguyen 3b2dbc4f33 usb: dwc3: Soft reset phy on probe for host
commit 8bea147dfd upstream.

When there's phy initialization, we need to initiate a soft-reset
sequence. That's done through USBCMD.HCRST in the xHCI driver and its
initialization, However, the dwc3 driver may modify core configs before
the soft-reset. This may result in some connection instability. So,
ensure the phy is ready before the controller updates the GCTL.PRTCAPDIR
or other settings by issuing phy soft-reset.

Note that some host-mode configurations may not expose device registers
to initiate the controller soft-reset (via DCTL.CoreSftRst). So we reset
through GUSB3PIPECTL and GUSB2PHYCFG instead.

Cc: stable@vger.kernel.org
Fixes: e835c0a4e2 ("usb: dwc3: don't reset device side if dwc3 was configured as host-only")
Reported-by: Kenta Sato <tosainu.maple@gmail.com>
Closes: https://lore.kernel.org/linux-usb/ZPUciRLUcjDywMVS@debian.me/
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Tested-by: Kenta Sato <tosainu.maple@gmail.com>
Link: https://lore.kernel.org/r/70aea513215d273669152696cc02b20ddcdb6f1a.1694564261.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-19 23:05:35 +02:00
..
Kconfig
Makefile
core.c usb: dwc3: Soft reset phy on probe for host 2023-10-19 23:05:35 +02:00
core.h Revert "usb: dwc3: core: Enable AutoRetry feature in the controller" 2023-08-03 10:22:41 +02:00
debug.h USB: dwc3: fix memory leak with using debugfs_lookup() 2023-03-11 13:57:35 +01:00
debugfs.c usb: dwc3: debugfs: Resume dwc3 before accessing registers 2023-05-24 17:36:52 +01:00
drd.c
dwc3-exynos.c usb: dwc3: exynos: Fix remove() function 2022-12-02 17:41:08 +01:00
dwc3-haps.c
dwc3-imx8mp.c
dwc3-keystone.c
dwc3-meson-g12a.c usb: dwc3: meson-g12a: do post init to fix broken usb after resumption 2023-09-06 21:28:38 +01:00
dwc3-of-simple.c
dwc3-omap.c
dwc3-pci.c usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy 2023-08-03 10:22:42 +02:00
dwc3-qcom.c USB: dwc3: qcom: fix NULL-deref on suspend 2023-08-26 14:23:29 +02:00
dwc3-st.c
dwc3-xilinx.c
ep0.c
gadget.c usb: dwc3: gadget: Improve dwc3_gadget_suspend() and dwc3_gadget_resume() 2023-08-26 14:23:28 +02:00
gadget.h
host.c Revert "usb: dwc3: disable USB core PHY management" 2022-11-26 09:24:44 +01:00
io.h
trace.c
trace.h
ulpi.c