Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp193805rwn; Wed, 14 Sep 2022 18:50:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR4md9QxxGX54zFGeZvkHCQkgUJpCJXrd7TBR3vVcMiySl/e07gjWX8T93hNOjcqz29Y+Nso X-Received: by 2002:a63:e906:0:b0:41b:eba0:8b6d with SMTP id i6-20020a63e906000000b0041beba08b6dmr33353047pgh.501.1663206618469; Wed, 14 Sep 2022 18:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663206618; cv=none; d=google.com; s=arc-20160816; b=cr1yByzAGwIyhIdr74zk6Y7dh1YWrlYCEGcd06MMppa46NJzNo5nUh+XNW8NwNxipj ZFFST3n8kspfahGjnL53K+wDOjoRGDVx96t/iUhyLktkyTj0g6JHNcmJuReuuF8al9iX ZlAXSru4q7UARAqk/0bA0OLqq1iHnlYCU21npTg7hCALqw+Iuka2H2bKI5m4AcZzT9up 2JzcDfNkopfSJzUasjNHKcVcCHUEsWy5Ndb3jC2w+v5xp8Gfs1sTDcUpAYUGzb4nZDaV LMQtQKRUHs1HIyT+b9h9OqUvy0RxEWkBAAz+mFRzPY++tcAxm+3FwVQuTW+X4UKGa5Tl j3Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=nLwNKLtgi3TaGevge4euau6kx/SkiKrrdt3uLuqq/hA=; b=nk6vVb6jYNWCWoBYEYi+/E6eRallYTZeILh6WZGuSr+BJK+oWLN2a+heovWlKeB2jy 63Hx8yDR9G7PxBpw7510gwdUs8VwGitLq8wmzh+KJg5xfP4raYcjE91cDW8t5w3r0Yxz Lo35DIM6oFCW5gjeWsBmoCs4MUNfMmWnBhhn5kx8v2d0KD9dluiDWc0ioiaDoWEH0D2c oP0jt7PfVPjmO2YI6aaZfYioT9PzsyopKU/KdVkUCB8L0jjHMahZQBaqrqn3kCntqPto 5L7SZ5A9vOEvn2IXR8dC0HUmQCQhMF6tNM96P94mEjZmwmagol0E1J1wxaMZfN24FB5s PQOg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k7-20020a170902c40700b0016eddf64b6dsi5486807plk.181.2022.09.14.18.50.06; Wed, 14 Sep 2022 18:50:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229888AbiIOBOU (ORCPT + 99 others); Wed, 14 Sep 2022 21:14:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229521AbiIOBOT (ORCPT ); Wed, 14 Sep 2022 21:14:19 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68D178B9AE; Wed, 14 Sep 2022 18:14:16 -0700 (PDT) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MSfHj68M9zNmDk; Thu, 15 Sep 2022 09:09:37 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 15 Sep 2022 09:14:14 +0800 Received: from huawei.com (10.69.192.56) by kwepemm600005.china.huawei.com (7.193.23.191) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 15 Sep 2022 09:14:13 +0800 From: Longfang Liu To: , CC: , , , Subject: [PATCH] xhci: print warning when HCE was set Date: Thu, 15 Sep 2022 09:11:34 +0800 Message-ID: <20220915011134.58400-1-liulongfang@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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