Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp15275rwb; Tue, 27 Sep 2022 21:43:35 -0700 (PDT) X-Google-Smtp-Source: AMsMyM49b8UQwD/Tkc9KEcDm0AxBB5prXBgD7MPL/439111TH2Hp0se1KXtUxJRivCkAxViF6+lY X-Received: by 2002:a17:90a:fc96:b0:203:86f:5a86 with SMTP id ci22-20020a17090afc9600b00203086f5a86mr8399902pjb.108.1664340215261; Tue, 27 Sep 2022 21:43:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664340215; cv=none; d=google.com; s=arc-20160816; b=BtccO8+fLrwsGTp6qPyrPY793Q/pLUbRbDaKlLPtBgwlUAsYpmh6YDOD7QXLfHxWK1 YVx8UKtv2GM497ANuA1nfnJls7yo3IifnKZFI4kvsL3fb7xaVfT+Yi7T7h4K1faznMvQ 3JG9FTbIDPvCVvIFJZ6v9YxMaGYojZGbE/shdDvFpl32uIosKdzXjiRHW47cVeNBVjsn kWIGDVLJHBRN0A9ugSiME6WvK/Nr8nBCNI7/rT9y/yhtsmEZIA3AYRZ0Xfixq7ObX3gK eedIx49sTEVxIsmaA51eOaAK3bk6zWDS9XCj1PAsFRQLFgGsY16sJ4iOk0V2mTnzyZUT /38A== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yFiQRqenBnP9hKkiD46tWPwfT0QDu8/bSPBGZoBlzgg=; b=ofxWinnOAaqLT810tXgVtx8n5ZS5d9NHs4Ns8RwA+SD9DyfgQBl8+N2YnL6TNNP8b3 P/u1ShIVSBIRG59ksYpPGgr94D0BaobI8Z1kEi7XLlZApDC8cJ+jqXwE3DDojPP0KhlJ LY5Bzq4VQF8x9Gn+WneMq23RudwjTi57ny6u+DshcoqAgVf5nLzjMNGS8VfB0KZT/nuf vOugWPpLFidBTupY8mj3phVvaxAtde1F8vIoMdl4z0fC3T4A5ZWrghsb7RTOLVITVE9q XVA3LrbePviEAFo0ferTbVkPyGemjwgPxxz9XFHa1IXTYcbHbttf+0CGQkeadyYWdByw A5lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=hooLisGa; 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=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q11-20020a056a00150b00b0052e6c99a571si1900907pfu.323.2022.09.27.21.43.16; Tue, 27 Sep 2022 21:43:35 -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; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=hooLisGa; 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=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232210AbiI1EUo (ORCPT + 99 others); Wed, 28 Sep 2022 00:20:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiI1EUl (ORCPT ); Wed, 28 Sep 2022 00:20:41 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72AC71D35BA for ; Tue, 27 Sep 2022 21:20:39 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id s26so11167087pgv.7 for ; Tue, 27 Sep 2022 21:20:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date; bh=yFiQRqenBnP9hKkiD46tWPwfT0QDu8/bSPBGZoBlzgg=; b=hooLisGajE4+4MwjNaS+l0+/mZZQz4+CXmfDaAvTbcp9Vb50hZQ8aJX/wZVVTmklb8 n6kAK0pb7T39ni+nyQij+Z33mFANX2gP59HOmQ2XVe9TpjPpvoK1f31TcXv/n0YN4Bbg oS0dvXxSAH+KGgT83rhf206mzkxGsmpGkXwP3xhud1dynDIW1Yi7bNpwtojs8D5EWod6 3xDmV6JqIpMjZ3OETd+JUcNTA6KSjVFhr1gGxbBi0ltsZvxy/Lu2xv4k9gusJ2nJ0p2J 1TEuv26ILz7fv5H1uHRQbi5VKSiuCyR7YSF24qohAlC1hw9HPvEcGBSYype8ptPffYj2 W0Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date; bh=yFiQRqenBnP9hKkiD46tWPwfT0QDu8/bSPBGZoBlzgg=; b=qWMMGuE+5A8DydrgpIZ4ZbykNlvnFQtLkdqWVg6lcQEuEfvykQy7BpiPXVn0V0pBnG UzavSDnleOrV8rexXf/e35BwQEdTcDs1wi568PDohbOLBXbtv19JPcAMlAZ9N/ZONDbp JpNu1s19J83g0Pv+OgzNReS+ntlEN/2p2wCIV3ZpbBaJiCoSxuUzqU8eBvcVGQqIXsHO jZDk+NI5mpTDcOzCWfra2Ggtp4QQml7sKPmCP/dyduRHy3rRmZOdZWjXZ/6MTZihFSdT SHlvPtEJ1rVpstRpMfRaXx+IhZ+3Vj2UH2T+NNJAlYDa3fhLv0dbDH/lHqqYtPayyz3y qBvA== X-Gm-Message-State: ACrzQf2yUxWrGhXoztoPfFOJHgvZ30e6I846uXTZqLltYbYGu8C5QrzR fdn6QaYV0lpqiL9k0wBylvYchQ== X-Received: by 2002:a65:644c:0:b0:43c:e614:ae0e with SMTP id s12-20020a65644c000000b0043ce614ae0emr7481081pgv.491.1664338839008; Tue, 27 Sep 2022 21:20:39 -0700 (PDT) Received: from ?IPV6:fdbd:ff1:ce00:f:181d:9138:3f2b:d59e? ([2400:8800:1f02:83:4000::7]) by smtp.gmail.com with ESMTPSA id h8-20020a170902680800b0017a018221e2sm324111plk.70.2022.09.27.21.20.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Sep 2022 21:20:38 -0700 (PDT) Message-ID: <1d62d0ac-b47c-94b5-dd75-b7df71817d0d@bytedance.com> Date: Wed, 28 Sep 2022 12:20:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: [External] Re: [PATCH v2 3/9] NTB: Change to use pci_aer_clear_uncorrect_error_status() Content-Language: en-US To: Sathyanarayanan Kuppuswamy , bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com, fancer.lancer@gmail.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, james.smart@broadcom.com, dick.kennedy@broadcom.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ntb@lists.linux.dev, linux-scsi@vger.kernel.org References: <20220927153524.49172-1-chenzhuo.1@bytedance.com> <20220927153524.49172-4-chenzhuo.1@bytedance.com> From: Zhuo Chen In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 9/28/22 3:39 AM, Sathyanarayanan Kuppuswamy wrote: > > > On 9/27/22 8:35 AM, Zhuo Chen wrote: >> Status bits for ERR_NONFATAL errors only are cleared in >> pci_aer_clear_nonfatal_status(), but we want clear uncorrectable >> error status in idt_init_pci(), so we change to use >> pci_aer_clear_uncorrect_error_status(). > > You mean currently driver does not clear fatal errors now, and it is > a problem? Any error reported? > Hi Sathyanarayanan, No error reports yet, I just changes the behavior back to what it was before commit e7b0b847de6d ("PCI/AER: Clear only ERR_NONFATAL bits during non-fatal recovery"), because this commit change the original function in commit bf2a952d31d2 ("NTB: Add IDT 89HPESxNTx PCIe-switches support"). > Also, I am wondering why is it required to clear errors during init > code. Is it a norm? > I think there is no need to clear errors during init code. >> >> Signed-off-by: Zhuo Chen >> --- >> drivers/ntb/hw/idt/ntb_hw_idt.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/ntb/hw/idt/ntb_hw_idt.c b/drivers/ntb/hw/idt/ntb_hw_idt.c >> index 0ed6f809ff2e..d5f0aa87f817 100644 >> --- a/drivers/ntb/hw/idt/ntb_hw_idt.c >> +++ b/drivers/ntb/hw/idt/ntb_hw_idt.c >> @@ -2657,8 +2657,8 @@ static int idt_init_pci(struct idt_ntb_dev *ndev) >> ret = pci_enable_pcie_error_reporting(pdev); >> if (ret != 0) >> dev_warn(&pdev->dev, "PCIe AER capability disabled\n"); >> - else /* Cleanup nonfatal error status before getting to init */ >> - pci_aer_clear_nonfatal_status(pdev); >> + else /* Cleanup uncorrectable error status before getting to init */ >> + pci_aer_clear_uncorrect_error_status(pdev); >> >> /* First enable the PCI device */ >> ret = pcim_enable_device(pdev); > -- Thanks, Zhuo Chen