linux/drivers/usb/dwc3
Janne Grunau 42c85d89b8 usb: dwc3: apple: Ignore USB role switches to the active role
Ignore USB role switches if dwc3-apple is already in the desired state.
The USB-C port controller on M2 and M1/M2 Pro/Max/Ultra devices issues
additional interrupts which result in USB role switches to the already
active role.
Ignore these USB role switches to ensure the USB-C port controller and
dwc3-apple are always in a consistent state. This matches the behaviour
in __dwc3_set_mode() in core.c.
Fixes detecting USB 2.0 and 3.x devices on the affected systems. The
reset caused by the additional role switch appears to leave the USB
devices in a state which prevents detection when the phy and dwc3 is
brought back up again.

Fixes: 0ec946d32e ("usb: dwc3: Add Apple Silicon DWC3 glue layer driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Janne Grunau <j@jannau.net>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Reviewed-by: Sven Peter <sven@kernel.org>
Tested-by: Sven Peter <sven@kernel.org> # M1 mac mini and macbook air
Link: https://patch.msgid.link/20260109-apple-dwc3-role-switch-v1-1-11623b0f6222@jannau.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-01-14 16:02:54 +01:00
..
core.c usb: dwc3: Check for USB4 IP_NAME 2026-01-07 16:27:32 +01:00
core.h usb: dwc3: Check for USB4 IP_NAME 2026-01-07 16:27:32 +01:00
debug.h usb: dwc3: Add trace event for dwc3_set_prtcap 2025-09-06 15:21:59 +02:00
debugfs.c usb: dwc3: Refactor dwc3_mode_show 2025-09-06 15:21:59 +02:00
drd.c usb: dwc3: Allow usb role swich control from userspace 2025-10-24 14:41:20 +02:00
dwc3-am62.c usb: Remove redundant pm_runtime_mark_last_busy() calls 2025-11-21 15:11:53 +01: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: eic7700: Add EIC7700 USB driver 2025-11-21 15:13:35 +01:00
dwc3-haps.c usb: dwc3: haps: Constify the software node 2021-02-04 15:42:06 +01:00
dwc3-imx8mp.c USB/Thunderbolt changes for 6.19-rc1 2025-12-06 18:42:12 -08: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 device leaks at unbind 2025-07-25 10:50:43 +02:00
dwc3-octeon.c usb: Switch back to struct platform_driver::remove() 2024-10-04 15:13:03 +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/Thunderbolt changes for 6.19-rc1 2025-12-06 18:42:12 -08: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: Add software-managed properties for flattened model 2025-10-13 09:11:50 +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: Remove redundant pm_runtime_mark_last_busy() calls 2025-11-21 15:11:53 +01:00
ep0.c usb: dwc3: Fix race condition between concurrent dwc3_remove_requests() call paths 2025-11-21 15:15:48 +01:00
gadget.c usb: dwc3: keep susphy enabled during exit to avoid controller faults 2025-12-17 14:49:18 +01:00
gadget.h Merge 6.8-rc5 into usb-next 2024-02-19 09:13:29 +01:00
glue.h usb: dwc3: glue: Allow more fine grained control over mode switches 2025-10-22 10:58:31 +02:00
host.c usb: dwc3: keep susphy enabled during exit to avoid controller faults 2025-12-17 14:49:18 +01:00
io.h usb: dwc3: fix incorrect kernel-doc comment syntax in files 2021-04-02 15:20:51 +02:00
Kconfig usb: dwc3: Add Apple Silicon DWC3 glue layer driver 2025-10-22 10:58:31 +02:00
Makefile usb: dwc3: Add Apple Silicon DWC3 glue layer driver 2025-10-22 10:58:31 +02: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: Add trace event for dwc3_set_prtcap 2025-09-06 15:21:59 +02:00
ulpi.c usb: dwc3: ulpi: Fix USB2.0 HS/FS/LS PHY suspend regression 2020-12-28 15:55:44 +01:00