summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLongfang Liu <liulongfang@huawei.com>2022-11-30 12:19:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-30 14:10:47 +0300
commit2a25e66d676dfb9b018abd503deed3d38a892dec (patch)
tree9f5b9e973f2fd6fdddb54f3bfba3fd275217d980
parent51daa42d6b86efa366320b99e7bbe29a490ed348 (diff)
downloadlinux-2a25e66d676dfb9b018abd503deed3d38a892dec.tar.xz
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>
-rw-r--r--drivers/usb/host/xhci-ring.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index ad81e9a508b1..f6af479188e8 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -3031,6 +3031,11 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd)
if (!(status & STS_EINT))
goto out;
+ if (status & STS_HCE) {
+ xhci_warn(xhci, "WARNING: Host Controller Error\n");
+ goto out;
+ }
+
if (status & STS_FATAL) {
xhci_warn(xhci, "WARNING: Host System Error\n");
xhci_halt(xhci);