Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xhci: print warning when HCE was set

When HCE(Host Controller Error) is set, it means that the xhci hardware
controller has an error at this time, but the current xhci driver
software does not log this event.

By adding an HCE event detection in the xhci interrupt processing
interface, a warning log is output to the system, which is convenient
for system device status tracking.

Signed-off-by: Longfang Liu <liulongfang@huawei.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20221130091944.2171610-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Longfang Liu and committed by
Greg Kroah-Hartman
2a25e66d 51daa42d

+5
+5
drivers/usb/host/xhci-ring.c
··· 3031 3031 if (!(status & STS_EINT)) 3032 3032 goto out; 3033 3033 3034 + if (status & STS_HCE) { 3035 + xhci_warn(xhci, "WARNING: Host Controller Error\n"); 3036 + goto out; 3037 + } 3038 + 3034 3039 if (status & STS_FATAL) { 3035 3040 xhci_warn(xhci, "WARNING: Host System Error\n"); 3036 3041 xhci_halt(xhci);