Created attachment 282123 [details]
On my ThinkPad E585, with a Ryzen 5 2500U, my XHCI driver crashes when a USB device is plugged into any port.
Steps to Reproduce:
1. Boot the system normally.
2. Plug in a device to any USB port.
The USB device fails to register; the XHCI driver crashes and is unusable. Device does not show up in the output of `lsusb`.
Tail of dmesg output (full output attached):
[ 51.276650] xhci_hcd 0000:05:00.4: Refused to change power state, currently in D3
[ 51.276658] xhci_hcd 0000:05:00.3: Refused to change power state, currently in D3
[ 51.277051] xhci_hcd 0000:05:00.3: enabling device (0000 -> 0002)
[ 51.277074] xhci_hcd 0000:05:00.3: WARN: xHC restore state timeout
[ 51.277077] xhci_hcd 0000:05:00.3: PCI post-resume error -110!
[ 51.279316] xhci_hcd 0000:05:00.3: HC died; cleaning up
[ 51.288669] xhci_hcd 0000:05:00.4: enabling device (0000 -> 0002)
Expected results: Device connects, powers on, and registers properly, showing up in `lsusb`.
Build: Linux 4.19.32_1 #1 SMP PREEMPT Wed Mar 27 20:41:38 UTC 2019 x86_64 GNU/Linux, with firmware 20181218
Related issue - https://bugs.launchpad.net/ubuntu/+source/linux-oem/+bug/1756700
I've done more investigation:
- I disabled laptop_mode which was running by default (I assume that was messing with idle power state), and USB works until the laptop is suspended, with a slightly different message upon resume:
[ 127.865337] xhci_hcd 0000:05:00.3: Refused to change power state, currently in D3
[ 127.877353] xhci_hcd 0000:05:00.3: enabling device (0000 -> 0002)
After plugging in a USB device, it outputs:
[ 135.368383] xhci_hcd 0000:05:00.3: Error while assigning device slot ID
[ 135.368393] xhci_hcd 0000:05:00.3: Max number of devices this xHCI host supports is 64.
[ 135.368402] usb usb1-port2: couldn't allocate usb_device
[ 136.392374] Bluetooth: hci0: RTL: download fw command failed (-110)
[ 138.986111] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
[ 139.009743] EXT4-fs (sda1): re-mounted. Opts: commit=0
[ 141.512347] xhci_hcd 0000:05:00.4: xHCI host not responding to stop endpoint command.
[ 141.512369] xhci_hcd 0000:05:00.4: xHCI host controller not responding, assume dead
[ 141.512410] xhci_hcd 0000:05:00.4: HC died; cleaning up
[ 141.512445] usb 3-1: USB disconnect, device number 4
[ 141.512650] xhci_hcd 0000:05:00.4: Timeout while waiting for stop endpoint command
[ 141.513239] usb 3-2: USB disconnect, device number 3
On Thu, Apr 04, 2019 at 12:33:47AM +0000, email@example.com wrote:
> Bug ID: 203147
> Summary: Raven Ridge xhci_hcd not working: "Refused to change
> power state, currently in D3"
> Product: Drivers
> Version: 2.5
> Kernel Version: 4.19.23
All USB bugs should be sent to the firstname.lastname@example.org mailing
list, and not entered into bugzilla. Please bring this issue up there,
if it is still a problem in the latest kernel release.