[PATCH] xhci: Reset controller on xhci shutdown
From: wenxiong
Date: Thu Oct 01 2026 - 18:28:15 EST
From: Wen Xiong <wenxiong@xxxxxxxxxxxxx>
Fixes kexec boot. Without a hard reset, some USB chips will fail to
initialize in a kexec booted kernel.
Signed-off-by: Brian King <brking@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Samuel Mendoza-Jonas <sam@xxxxxxxxxxxxxxxx>
Signed-off-by: Joel Stanley <joel@xxxxxxxxx>
Signed-off-by: Wen Xiong <wenxiong@xxxxxxxxxxxxx>
---
drivers/usb/host/xhci.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index a9e47e178c28..364bd61a4bd7 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -781,6 +781,9 @@ void xhci_shutdown(struct usb_hcd *hcd)
xhci_dbg_trace(xhci, trace_xhci_dbg_init,
"xhci_shutdown completed - status = %x",
readl(&xhci->op_regs->status));
+
+ /* TI XHCI controllers do not come back after kexec without this hack */
+ pci_reset_function_locked(to_pci_dev(hcd->self.sysdev));
}
EXPORT_SYMBOL_GPL(xhci_shutdown);
--
2.52.0