Re: [PATCH] xhci: Reset controller on xhci shutdown
From: Wen Xiong
Date: Wed Oct 14 2026 - 16:32:41 EST
On 2026-10-06 05:55, Michal Pecio wrote:
Are you able to capture the original kernel's dmesg (through serial,Below is xhci messages after executing a kexec kernel. This is dmesg for kexec kernel.
netconsole, etc) and see if the same "Host halt failed" is there?
[root@ltc-boston11 ~]# dmesg|grep xhci
[ 1.085853] xhci_hcd 0005:01:00.0: xHCI Host Controller
[ 1.085992] xhci_hcd 0005:01:00.0: new USB bus registered, assigned bus number 1
[ 1.144472] xhci_hcd 0005:01:00.0: Host halt failed, -110
[ 1.144518] xhci_hcd 0005:01:00.0: can't setup: -110
[ 1.144571] xhci_hcd 0005:01:00.0: USB bus 1 deregistered
[ 1.144778] xhci_hcd 0005:01:00.0: init 0005:01:00.0 fail, -110
[ 1.144842] xhci_hcd 0005:01:00.0: probe with driver xhci_hcd failed with error -110
This is the reason why we can't see usb devices after a kexec kernel.
With the patch,
#dmesg|grep xhci
[ 0.859562] xhci_hcd 0005:01:00.0: xHCI Host Controller
[ 0.859670] xhci_hcd 0005:01:00.0: new USB bus registered, assigned bus number 1
[ 0.859797] xhci_hcd 0005:01:00.0: iommu: 64-bit OK but direct DMA is limited by 0
[ 0.859858] xhci_hcd 0005:01:00.0: iommu: 64-bit OK but direct DMA is limited by 0
[ 0.859982] xhci_hcd 0005:01:00.0: hcc params 0x0270f06d hci version 0x96 quirks 0x0000000004000000
[ 0.860614] xhci_hcd 0005:01:00.0: xHCI Host Controller
[ 0.860719] xhci_hcd 0005:01:00.0: new USB bus registered, assigned bus number 2
[ 0.860770] xhci_hcd 0005:01:00.0: Host supports USB 3.0 SuperSpeed
[ 0.861091] usb usb1: Manufacturer: Linux 7.3.0-rc6-usb-gbatra+ xhci-hcd
[ 0.862130] usb usb2: Manufacturer: Linux 7.3.0-rc6-usb-gbatra+ xhci-hcd
[ 1.127210] usb 1-3: new high-speed USB device number 2 using xhci_hcd
[ 1.407320] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
[ 1.556759] usb 1-4: new high-speed USB device number 3 using xhci_hcd
[ 1.806902] usb 1-3.1: new low-speed USB device number 4 using xhci_hcd
#[root@ltc-boston11 ~]# lsusb
Bus 002 Device 002: ID 18a5:0252 Verbatim, Ltd
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0451:80ff Texas Instruments, Inc.
Bus 001 Device 004: ID 0557:2419 ATEN International Co., Ltd Virtual mouse/keyboard device
Bus 001 Device 002: ID 0557:7000 ATEN International Co., Ltd Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
And if you enable dynamic debug before kexec,After executing a kexec kernel, is the control setting lost?
echo 'module xhci_hcd +p' >/proc/dynamic_debug/control
what's printed by the debug message at the end of xhci_shutdown()?
Do you also get errors from quirk_usb_handoff_xhci() by any chance?
I didn't see much useful information in control after a kexec kernel.
Probably we can resubmit the patch with mathias's suggestion.
Thanks,
Wendy
T