Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp70569rwi; Thu, 13 Oct 2022 21:37:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM663TZZIjre3rl4x+03JLLyfhymSQaqUHDXWPEpJyroM5EG3ERQccTS4V/IZI4c+VIubOqN X-Received: by 2002:a17:902:ef85:b0:17f:5f55:9425 with SMTP id iz5-20020a170902ef8500b0017f5f559425mr3221008plb.135.1665722235196; Thu, 13 Oct 2022 21:37:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665722235; cv=none; d=google.com; s=arc-20160816; b=f4Lowqy8jr3cmLzaOju20zIq2SMNVqM+DqyFM0/OJ0QnYK49veWL/nGBBWfVWZoQYE vr2G5Kb34Fa//XFM79UEX7hAUkQbk+c+oAsYLOQG9ZHiegmPDbGzeCGcPISj27sjaXUA BB7A6VljZwou/Aps2cq4m0/Er9fe3zMavG0nUvu8CipaS8Ol9I/SQA2/A5TR4n8Xt48r 4/hSMzFIzA/Z/j4nc6afUp6/mNLwgfZ/1u0qNGfFh7hp/ydfGr7Nhkc62y6PY58I6pCR uvKYGtTxecBmY1nHGgphbD8/ZASAF5ILm4v4fF2+wnP9YETbYGxsfE+35RUU+ulmgztF sCfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=GU2tZa9KxghP+bu1HAVEF9OLU6prSE2rosHFrUXSJfA=; b=o9WklOaQ+3bV3t1m2XnSNR5gPwp6DQucgN6GVFXTSM+OHc+ZVuqXl2DZnDCDvkamOz 3UcNveXZ8lxl+nepLBrftQk/yzxZ/BQ5ENDlFTo1WfjSneRJiCCO5JHwxZujLHQJ25wm i3b92FluavnaaiD7vubJQQZGMXE4UJBEtHKggSDl8md1+fVffB8IvksG2eN3A4fcGvdn 0FQ+JyUZw0CPWcoHuXoKyNkk0Gboc/uS4B51dVmURBCuMQ+Pbn4BYyb01348YVlzs6Cx RYc3ZqfNLvKvRQpl/NTF7u6gAqbV6MMtGWT/ILY+XjleauKNyTNvz54AVh1Lc+OBiseN KE+w== 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 bd11-20020a170902830b00b00180d51f70cfsi1881272plb.107.2022.10.13.21.37.02; Thu, 13 Oct 2022 21:37:15 -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 S229578AbiJNDN7 (ORCPT + 99 others); Thu, 13 Oct 2022 23:13:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229918AbiJNDNW (ORCPT ); Thu, 13 Oct 2022 23:13:22 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 63AB31A0C00; Thu, 13 Oct 2022 20:12:36 -0700 (PDT) Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4MpWZn742RzDsWX; Fri, 14 Oct 2022 11:09:37 +0800 (CST) Received: from kwepemm600005.china.huawei.com (7.193.23.191) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 14 Oct 2022 11:12:11 +0800 Received: from [10.67.103.158] (10.67.103.158) 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; Fri, 14 Oct 2022 11:12:10 +0800 Subject: Re: [PATCH] xhci: print warning when HCE was set To: Mathias Nyman , , CC: , , References: <20220915011134.58400-1-liulongfang@huawei.com> <6b5a45f1-caf3-4259-77da-e36788f5b8a9@linux.intel.com> <2648444c-2f2a-4d9b-8545-6677663adcf0@huawei.com> <8271d551-4034-71fe-5be4-e08e28b6dd6b@linux.intel.com> From: liulongfang Message-ID: <19ab61d6-c2a2-42be-2bb6-500636868703@huawei.com> Date: Fri, 14 Oct 2022 11:12:10 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <8271d551-4034-71fe-5be4-e08e28b6dd6b@linux.intel.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.158] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemm600005.china.huawei.com (7.193.23.191) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 On 2022/9/26 15:58, Mathias Nyman wrote: > On 24.9.2022 5.35, liulongfang wrote: >> On 2022/9/22 21:01, Mathias Nyman Wrote: >>> Hi >>> >>> On 15.9.2022 4.11, Longfang Liu wrote: >>>> 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. >>>> >>> >>> xHC should cease all activity when it sets HCE, and is probably not >>> generating interrupts anymore. >>> >>> Would probably be more useful to check for HCE at timeouts than in the >>> interrupt handler. >>> >> >> Which function of the driver code is this timeout in? > > xhci_handle_command_timeout() will usually trigger at some point, > Because this HCE error is reported in the form of an interrupt signal, it is more concise to put it in xhci_irq() than in xhci_handle_command_timeout(). >> >>> If this is something seen on actual hardware then it makes sense to add it. >>> >> >> This HCE error is sure to report an interrupt on the chip we are using. > > Ok, then makes sense to add this patch. > > Thanks > -Mathias > Thanks, Longfang. > . >