Re: [PATCH] xhci: Reset controller on xhci shutdown
From: Michal Pecio
Date: Wed Oct 21 2026 - 05:31:46 EST
On Tue, 20 Oct 2026 15:40:24 -0500, Wen Xiong wrote:
> Above patch is similar like my V1 patch.
> It works fine and all usb devices are showed up after executing a kexec.
Thanks for testing. The big difference is that my patch does nothing
if the preceding xhci_halt() completes successfully. So if it helps,
this tells us that xhci_halt() fails and the chip most likely locks up
right there, during xhci_shutdown().
It probably fails due to some devices that are connected and haven't
been shut down normally; I suspect that nothing bad would happen if
you disconnect all devices or unbind xhci_hcd before kexec, but we
still need to cope with surprise shutdown somehow.
In such case your suggestion to PCI reset may be the simplest way out.
It seems we could either call it always on TI chips, or automatically
as a fallback when xhci_shutdown() fails to halt the xHC.
Mathias, any preferences?
The latter is perhaps a bit cleaner and more generally useful, though
I must say that I tested rebooting with a bunch of devices connected
to a few different HCs and all of them passed through xhci_shutdown()
successfully, so the issue isn't widespread. I don't have TUSB7340.
Regards,
Michal