Ahead of the Linux 6.19-rc6 kernel release due out later today are two USB fixes for Apple M1 / M2 Macs running the mainline kernel. These Apple USB fixes are also marked for back-porting to the stable Linux kernel series.
First up is a fix for the USB-C port controller on the Apple M2 and M1/M2 Pro/Max/Ultra devices that caused issues detecting USB 2.0 and USB 3.x devices. The patch explains that problem and now ignoring the 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.”
The second patch set to appear in Linux 6.19-rc6 is to set the USB2 PHY mode before the DWC3 initialization. This is intended to fix issues with USB2 devices plugged in before/during boot:
“Now that the upstream code has been getting broader test coverage by our users we occasionally see issues with USB2 devices plugged in during boot. Before Linux is running, the USB2 PHY has usually been running in device mode and it turns out that sometimes host->device or device->host transitions don’t work.
The root cause: If the role inside the USB2 PHY is re-configured when it has already been powered on or when dwc3 has already enabled the ULPI interface the new configuration sometimes doesn’t take affect until dwc3 is reset again. Fix this rare issue by configuring the role much earlier. Note that the USB3 PHY does not suffer from this issue and actually requires dwc3 to be up before the correct role can be configured there.”
It was during the Linux 6.19 merge window that the new Apple USB DWC3 code was upstreamed after long being in the downstream kernel of Asahi Linux.
Those Apple USB fixes are in this USB fixes pull sent out today. That pull also adds PICAXE AXE027 cable to the FTDI SIO driver, a quirk for the Elgato 4K X, and some other minor fixes.
