public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: jiangdayu <jiangdayu@xiaomi.com>,
	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>
Subject: Re: [PATCH] usb: xhci: add xhci_halt() for HCE Handling
Date: Tue, 27 Jan 2026 14:25:19 +0200	[thread overview]
Message-ID: <fbc1efce-8108-4e36-ad12-983be16c835e@linux.intel.com> (raw)
In-Reply-To: <20260127110422.306711-1-jiangdayu@xiaomi.com>

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.

Thanks
Mathias


  parent reply	other threads:[~2026-01-27 12:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-27 11:04 [PATCH] usb: xhci: add xhci_halt() for HCE Handling jiangdayu
2026-01-27 11:22 ` Greg Kroah-Hartman
2026-01-28  8:48   ` Dayu Jiang
2026-01-28  8:56     ` Greg Kroah-Hartman
2026-02-26  9:27       ` Dayu Jiang
2026-02-26 16:44         ` Mathias Nyman
2026-02-26 18:17           ` Thinh Nguyen
2026-02-27  7:26             ` Dayu Jiang
2026-02-28  0:22               ` Thinh Nguyen
2026-02-27  9:43             ` Mathias Nyman
2026-02-27 11:05               ` Michal Pecio
2026-02-28  0:06                 ` Thinh Nguyen
2026-02-28  0:18               ` Thinh Nguyen
2026-02-27  7:33           ` Dayu Jiang
2026-01-27 12:25 ` Mathias Nyman [this message]
2026-01-28  8:53   ` Dayu Jiang

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=fbc1efce-8108-4e36-ad12-983be16c835e@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=chenyu45@xiaomi.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=guhuinan@xiaomi.com \
    --cc=jiangdayu@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