Re: [PATCH v5] usb: pci-quirks: always assert xHCI OS ownership

From: Maciej Zonski

Date: Fri Oct 30 2026 - 12:54:46 EST


Hi,

I tested v5 of this patch on an ASUS ROG STRIX X870-I GAMING WIFI
(AMD 800 series chipset). It fixes the failed xHCI state restore on S3
resume and no USB device is reset any more.

Tested-by: Maciej Zonski <me@xxxxxxxx>

Hardware
--------
Board: ASUS ROG STRIX X870-I GAMING WIFI, BIOS 1805 (09/18/2026)
CPU: AMD Ryzen 9 9950X3D
Sleep: S3 ("deep"); /sys/power/mem_sleep is "s2idle [deep]"

6f:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD]
800 Series Chipset USB 3.x XHCI Controller [1022:43fc] (rev 01)
driver: xhci-pci-prom21
path: 00:02.1 -> 03:00.0 -> 04:0c.0 -> 6f:00.0
(behind the chipset PCIe switch)

Devices on that controller: Intel AX210 Bluetooth (8087:0032), a
Logitech Logi Bolt receiver (046d:c548), a YubiKey, and several
HID devices.

The CPU xHCI controllers (72:00.3, 72:00.4, 73:00.0) and the ASMedia
ASM4242 controller (6b:00.0) resume fine with and without the patch.
Only 6f:00.0 is affected.

Kernel
------
7.2.8 (NixOS, CachyOS flavour, so v7.2.8 plus the CachyOS patch set).
v5 applied cleanly (drivers/usb/host/pci-quirks.c only).

Before the patch
----------------
Every S3 resume I looked at showed this (shortened):

xhci-pci-prom21 0000:6f:00.0: xHC error in resume, USBSTS 0x401, Reinit
usb usb8: root hub lost power or was reset
usb usb9: root hub lost power or was reset
usb 8-7: WARN: invalid context state for evaluate context command.
usb 8-8: reset full-speed USB device number 6 using xhci-pci-prom21
usb 8-4: reset high-speed USB device number 2 using xhci-pci-prom21
usb 8-11: reset high-speed USB device number 7 using xhci-pci-prom21
usb 8-7: reset full-speed USB device number 5 using xhci-pci-prom21
usb 8-6: reset full-speed USB device number 4 using xhci-pci-prom21
usb 8-5: USB disconnect, device number 10
Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi

USBSTS 0x401 is HCH | SRE (halted, save/restore error). btusb then
re-probed the AX210, so bluetoothd lost and re-created the adapter, and
the USB devices on that controller were reset or re-enumerated.

The disconnect was also visible: on every resume the desktop showed a
"YubiKey connected" notification, because the key was re-enumerated as
a new device (device number 10 -> 11 in the log).

With v5 applied
---------------
I analyzed three S3 suspend/resume cycles on the patched kernel:

- two short ones in a row on one boot (about 13 s asleep each),
- one long one on a later boot: 07:29:58 -> 16:19:29, about 8 h 49 min
asleep.

In all three, the kernel log between "PM: suspend entry (deep)" and
"PM: suspend exit" contains none of the lines above: no "xHC error in
resume", no "root hub lost power or was reset", no "reset ... USB
device", no USB disconnect, and no hci0 firmware/probe lines. The
Bluetooth adapter stayed bound to btusb, and the YubiKey and the AX210
were still enumerated after the long sleep.

The "YubiKey connected" notification that appeared after every resume
before the patch has not appeared since the patch was applied.

The patch also fixed a problem I had given up on: my Logitech Bolt
receiver (046d:c548, port 8-6 on this controller) was reset and
re-enumerated on every resume, which made it unreliable, so I had
stopped using Logitech devices to wake the machine. With v5 applied the
Bolt Receiver works consistently across many suspend/resume cycles (this
is what I observed in daily use; the three cycles above are the ones I
checked in the kernel log).

Thanks for the fix.

Maciej Zonski