From: Dayu Jiang <jiangdayu@xiaomi.com>
To: Mathias Nyman <mathias.nyman@intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Longfang Liu <liulongfang@huawei.com>,
<linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
yudongbin <yudongbin@xiaomi.com>, guhuinan <guhuinan@xiaomi.com>,
chenyu45 <chenyu45@xiaomi.com>,
mahongwei3 <mahongwei3@xiaomi.com>,
Dayu Jiang <jiangdayu@xiaomi.com>
Subject: [PATCH v2] usb: xhci: add xhci_halt() for HCE Handling
Date: Wed, 28 Jan 2026 18:07:46 +0800 [thread overview]
Message-ID: <20260128100746.561626-1-jiangdayu@xiaomi.com> (raw)
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.
Fixes: 2a25e66d676df ("xhci: print warning when HCE was set")
Signed-off-by: Dayu Jiang <jiangdayu@xiaomi.com>
---
drivers/usb/host/xhci-ring.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 9315ba18310d..1cbefee3c4ca 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -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;
}
--
2.34.1
reply other threads:[~2026-01-28 10:08 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260128100746.561626-1-jiangdayu@xiaomi.com \
--to=jiangdayu@xiaomi.com \
--cc=chenyu45@xiaomi.com \
--cc=gregkh@linuxfoundation.org \
--cc=guhuinan@xiaomi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=liulongfang@huawei.com \
--cc=mahongwei3@xiaomi.com \
--cc=mathias.nyman@intel.com \
--cc=yudongbin@xiaomi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®