[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220915011134.58400-1-liulongfang@huawei.com>
Date: Thu, 15 Sep 2022 09:11:34 +0800
From: Longfang Liu <liulongfang@...wei.com>
To: <gregkh@...uxfoundation.org>, <mathias.nyman@...el.com>
CC: <linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<yisen.zhuang@...wei.com>, <liulongfang@...wei.com>
Subject: [PATCH] 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@...wei.com>
---
drivers/usb/host/xhci-ring.c | 5 +++++
1 file changed, 5 insertions(+)
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);
--
2.33.0
Powered by blists - more mailing lists