Linux 6.4 Fixes An Issue Where Intel USB Support Could Be Broken After Resume

Written by Michael Larabel in Linux Kernel on 1 May 2023 at 01:00 PM EDT. 2 Comments
LINUX KERNEL
Since last November has been a kernel bug report from a Canonical engineer after finding that the Intel Thunderbolt USB controller on various laptops was "dead" after resuming the system. That problem is now resolved with Linux 6.4 and this generic fix may end up helping other hardware as well.

This kernel bug report was opened last November after Canonical found a few Intel Comet Lake laptops where their Thunderbolt USB controller was no longer functioning after system resume on Linux. It was difficult to debug until Intel's Mika Westerberg who leads the Linux kernel's Thunderbolt work was able to get his hands on affected hardware, which at least includes various Dell laptops. Ultimately it was found to be affecting Intel Titan Ridge xHCI controllers and the solution is to let the kernel wait longer for the device when resuming the system.

With Linux 6.4 the kernel's PCI power management code will now allow waiting longer for PCIe devices to become ready after resuming the system, following a similar approach already taken by the Linux kernel during PCIe device resets. Westerberg explained in the one-line patch to the common PCI driver code:
"The PCIe spec prescribes that a device may take up to 1 second to recover from reset and this same delay is prescribed when coming out of D3cold (as that involves reset too). The device may extend this 1 second delay through Request Retry Status completions and we accommodate for that in Linux with 60 second cap, only in reset code path, not in resume code path.

However, a device has surfaced, namely Intel Titan Ridge xHCI, which requires longer delay also in the resume code path. For this reason make the resume code path to use this same extended delay than with the reset path."

As it's a fix to the common driver code and not specific to the Intel Titan Ridge xHCI, it's possible it may help out some other quirky hardware too.

Titan Ridge USB-C on Dell laptop


The one-liner allowing extra time for PCIe devices to become ready on resume was sent in last week as part of the PCI changes for Linux 6.4. That PCI pull also has an ASPM workaround for Chromebooks, Qualcomm's PCIe controller enabling async probing by default to reduce boot times, and various other hardware changes.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week