usb: xhci: add xhci_halt() for HCE Handling
Subsystems (2)
PATCH v2 1/1 usb: xhci: add xhci_halt() for HCE Handling
The xHCI controller reports a Host Controller Error (HCE) in UAS Storage Device plug/unplug scenarios on Android devices, which is checked in xhci_irq() function and causes an interrupt storm (since the interrupt isn’t cleared), leading to severe system-level faults.
When the xHCI controller reports HCE in the interrupt handler, the driver currently only logs a warning and continues execution. However, HCE indicates a critical hardware failure that requires the controller to be halted. This ensures the controller is in a consistent state and prevents further operations on failed hardware.
The change is made in xhci_irq() function where STS_HCE status is checked, mirroring the existing error handling pattern used for STS_FATAL errors.
--- drivers/usb/host/xhci-ring.c | 1 + 1 file changed, 1 insertion(+)
drivers/usb/host/xhci-ring.c +1 -0
@@ -3195,6 +3195,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)if (status &STS_HCE ) {xhci_warn (xhci,"WARNING: Host Controller Error\n" ); +xhci_halt (xhci); goto out; }
Signature · 1 line
2.34.1