Re: [PATCH] usb: xhci: add xhci_halt() for HCE Handling

From: Dayu Jiang

Date: Wed Jan 28 2026 - 03:53:26 EST


On Tue, Jan 27, 2026 at 02:25:19PM +0200, Mathias Nyman wrote:
> Hi
>
> On 1/27/26 13:04, jiangdayu wrote:
> > When the xHCI controller reports a Host Controller Error (HCE) status
> > in the interrupt handler, the driver currently only logs a warning and
> > continues execution. However, a Host Controller Error indicates a
> > critical hardware failure that requires the controller to be halted.
> >
>
> The host should cease all activity when it sets the HCE bit.
>
> See xHCI spec 4.24.1 'Internal Errors':
> "When the HCE flag is set to ‘1’ the xHC shall cease all activity.
> Software response to the assertion of HCE is to reset the
> xHC (HCRST = ‘1’) and reinitialize it."
>
> Same is true for "Host system error" HSE (STS_FATAL), not sure
> why we halt it manually in that case.
>
> > Add xhci_halt(xhci) call after the HCE warning to properly halt the
> > controller when this error condition is detected. This ensures the
> > controller is in a consistent state and prevents further operations
> > on a failed hardware. Additionally, if there are still unhandled
> > interrupts at this point, it may cause interrupt storm.
>
> Is this something that has been seen on real word hardware?
> If yes, and halting the host helped ,then this fix is ok by me.
> At least until a proper host reset solution is implemented.
Yes, the HCE issue (and subsequent interrupt storm) has been consistently
observed on production Android devices during UASP device plug/unplug
operations. Adding xhci_halt() effectively resolves the system-level interrupt
storm issue caused by HCE.
>
> Thanks
> Mathias
>