linux/drivers/usb/dwc3
Elson Serrao b58e620045 usb: dwc3: clear forceRM when issuing EndTransfer
The forceRM bit of the DEPCMD register controls the behavior of the
EndTransfer command used to stop an active transfer. Older DWC3
programming guide revisions recommended setting forceRM=1 when
issuing EndTransfer. Newer programming guide revisions recommend
issuing EndTransfer with forceRM cleared.

With forceRM=1 on DWC_usb31 v2.00a and v2.10a controllers, a transfer
aborted through the ep_dequeue path was observed to remain active
after EndTransfer completion. A subsequent StartTransfer issued on the
same endpoint triggered writes associated with the aborted transfer.
This resulted in an SMMU fault because the transfer buffer had already
been unmapped during EndTransfer command-completion cleanup.

Using forceRM=0 eliminates the issue. Although older DWC3 programming
guide revisions recommended setting forceRM=1, no issues are known
from using forceRM=0. Clear forceRM when issuing EndTransfer to provide
consistent EndTransfer behavior and align with newer programming guide
recommendations.

Fixes: 1e43c86d84 ("usb: dwc3: core: Add DWC31 version 2.00a controller")
Cc: stable <stable@kernel.org>
Signed-off-by: Elson Serrao <elson.serrao@oss.qualcomm.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://patch.msgid.link/20260813151456.867008-1-elson.serrao@oss.qualcomm.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-09-01 16:32:20 +02:00
..
core.c Merge 7.2-rc3 into usb-next 2026-07-13 07:09:28 +02:00
core.h usb: dwc3: fix kernel-doc string in struct dwc3_ep 2026-07-10 08:50:36 +02:00
debug.h usb: dwc3: Add trace event for dwc3_set_prtcap 2025-09-06 15:21:59 +02:00
debugfs.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
drd.c usb: dwc3: Add dwc pointer to dwc3_readl/writel 2026-01-16 13:47:07 +01:00
dwc3-am62.c usb: dwc3: am62: Propagate USB2 refclk enable failures 2026-07-10 08:50:36 +02:00
dwc3-apple.c usb: dwc3: apple: Ignore USB role switches to the active role 2026-01-14 16:02:54 +01:00
dwc3-exynos.c usb: dwc3-exynos: add support for ExynosAutov920 2025-05-21 13:12:43 +02:00
dwc3-generic-plat.c usb: dwc3: starfive: Add JHB100 USB 2.0 DRD controller 2026-04-11 12:02:43 +02:00
dwc3-google.c usb: dwc3: google: Initialise probe properties with DWC3_DEFAULT_PROPERTIES 2026-09-01 16:31:55 +02:00
dwc3-haps.c usb: dwc3: haps: Constify the software node 2021-02-04 15:42:06 +01:00
dwc3-imx.c usb: dwc3: imx: avoid calling imx suspend/resume callbacks twice 2026-03-18 16:22:18 +01:00
dwc3-imx8mp.c usb: dwc3: imx8mp: fix memory leak on probe failure path 2026-04-02 09:37:45 +02:00
dwc3-keystone.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
dwc3-meson-g12a.c usb: dwc3: meson-g12a: fix refcount leak in dwc3_meson_g12a_resume() 2026-06-25 16:04:11 +01:00
dwc3-octeon.c usb: dwc3: dwc3-octeon: Use FIELD_MODIFY() 2026-05-21 16:43:04 +02:00
dwc3-of-simple.c usb: dwc3: of-simple: fix clock resource leak in dwc3_of_simple_probe 2025-12-17 14:54:38 +01:00
dwc3-omap.c usb: dwc3: omap: Fix devm_regulator_get_optional() error handling 2025-01-11 17:02:30 +01:00
dwc3-pci.c usb: dwc3: pci: add support for the Intel Nova Lake -H 2026-03-11 16:19:41 +01:00
dwc3-qcom-legacy.c usb: dwc3: qcom: Snapshot driver for backwards compatibilty 2025-04-15 14:29:19 +02:00
dwc3-qcom.c usb: dwc3: qcom: make dwc3_qcom_glue_ops static 2026-07-10 08:50:36 +02:00
dwc3-rtk.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +02:00
dwc3-st.c usb: dwc3: Don't use %pK through printk 2025-03-14 09:17:30 +01:00
dwc3-xilinx.c usb: dwc3: xilinx: use reset_control_reset() in versal init 2026-07-08 17:06:43 +02:00
ep0.c usb: dwc3: clear forceRM when issuing EndTransfer 2026-09-01 16:32:20 +02:00
gadget.c usb: dwc3: clear forceRM when issuing EndTransfer 2026-09-01 16:32:20 +02:00
gadget.h usb: dwc3: Add dwc pointer to dwc3_readl/writel 2026-01-16 13:47:07 +01:00
glue.h usb: dwc3: add needs_full_reinit flag 2026-02-25 10:35:58 -08:00
host.c usb: xhci: standardize multi bit-field macros 2026-08-14 10:26:41 +09:00
io.h usb: dwc3: Log dwc3 address in traces 2026-01-27 15:52:45 +01:00
Kconfig usb: dwc3: introduce flatten model driver of i.MX Soc 2026-02-25 10:35:58 -08:00
Makefile usb: dwc3: introduce flatten model driver of i.MX Soc 2026-02-25 10:35:58 -08:00
trace.c usb: dwc3: fix incorrect kernel-doc comment syntax in files 2021-04-02 15:20:51 +02:00
trace.h usb: dwc3: Log dwc3 address in traces 2026-01-27 15:52:45 +01:00
ulpi.c usb: dwc3: Support USB3340x ULPI PHY high-speed negotiation. 2026-03-11 15:00:28 +01:00