OpenCloudOS-Kernel/drivers/usb/dwc3
Prashanth K c3d3501cf8 usb: dwc3: Wait for EndXfer completion before restoring GUSB2PHYCFG
commit c96e31252110a84dcc44412e8a7b456b33c3e298 upstream.

DWC3 programming guide mentions that when operating in USB2.0 speeds,
if GUSB2PHYCFG[6] or GUSB2PHYCFG[8] is set, it must be cleared prior
to issuing commands and may be set again  after the command completes.
But currently while issuing EndXfer command without CmdIOC set, we
wait for 1ms after GUSB2PHYCFG is restored. This results in cases
where EndXfer command doesn't get completed and causes SMMU faults
since requests are unmapped afterwards. Hence restore GUSB2PHYCFG
after waiting for EndXfer command completion.

Cc: stable@vger.kernel.org
Fixes: 1d26ba0944d3 ("usb: dwc3: Wait unconditionally after issuing EndXfer command")
Signed-off-by: Prashanth K <quic_prashk@quicinc.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20240924093208.2524531-1-quic_prashk@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-22 15:46:32 +02:00
..
Kconfig usb: dwc3: dwc3-octeon: Convert to glue driver 2023-08-04 14:52:15 +02:00
Makefile usb: dwc3: dwc3-octeon: Convert to glue driver 2023-08-04 14:52:15 +02:00
core.c usb: dwc3: core: Stop processing of pending events if controller is halted 2024-10-17 15:24:33 +02:00
core.h usb: dwc3: core: Stop processing of pending events if controller is halted 2024-10-17 15:24:33 +02:00
debug.h usb: dwc3: Add function suspend and function wakeup support 2023-03-29 10:27:01 +02:00
debugfs.c usb: dwc3: debugfs: Resume dwc3 before accessing registers 2023-05-13 17:56:22 +09:00
drd.c usb: dwc3: Fix default mode initialization 2023-12-03 07:33:10 +01:00
dwc3-am62.c usb: dwc3-am62: Disable wakeup at remove 2024-04-03 15:28:25 +02:00
dwc3-exynos.c usb: dwc3: exynos: Add support for Exynos850 variant 2023-08-22 14:47:22 +02:00
dwc3-haps.c
dwc3-imx8mp.c usb: dwc3: remove unnecessary platform_set_drvdata() 2023-08-22 14:45:19 +02:00
dwc3-keystone.c usb: dwc3: remove unnecessary platform_set_drvdata() 2023-08-22 14:45:19 +02:00
dwc3-meson-g12a.c usb: dwc3: meson-g12a: do post init to fix broken usb after resumption 2023-08-22 14:44:09 +02:00
dwc3-octeon.c just cleanups and fixes 2023-09-07 10:35:14 -07:00
dwc3-of-simple.c usb: dwc3: dwc3-octeon: Convert to glue driver 2023-08-04 14:52:15 +02:00
dwc3-omap.c usb: dwc3: omap: add missing depopulate in probe error path 2024-09-04 13:28:29 +02:00
dwc3-pci.c usb: dwc3: pci: add support for the Intel Panther Lake 2024-07-18 13:21:19 +02:00
dwc3-qcom.c USB: dwc3: qcom: fix wakeup after probe deferral 2023-12-03 07:33:10 +01:00
dwc3-st.c usb: dwc3: st: add missing depopulate in probe error path 2024-09-04 13:28:29 +02:00
dwc3-xilinx.c usb: dwc3-xilinx: Convert to platform remove callback returning void 2023-05-28 12:36:24 +01:00
ep0.c usb: dwc: ep0: Update request status in dwc3_ep0_stall_restart 2024-01-25 15:35:42 -08:00
gadget.c usb: dwc3: Wait for EndXfer completion before restoring GUSB2PHYCFG 2024-10-22 15:46:32 +02:00
gadget.h
host.c usb: dwc3: core: Prevent phy suspend during init 2024-05-17 12:02:29 +02:00
io.h
trace.c
trace.h usb: dwc3: change some trace event __dynamic_array() to __get_buf() 2023-03-09 15:35:03 +01:00
ulpi.c