Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8119776rwb; Tue, 6 Dec 2022 14:24:09 -0800 (PST) X-Google-Smtp-Source: AA0mqf4Wr8jX+Mkv/R4jAvTQmfMM0gBCve80TNa/vYKGvCglo5qtMZW3ozW1HoqE7OObbf8hbVWn X-Received: by 2002:a17:906:6bd4:b0:7c0:e23e:bbd6 with SMTP id t20-20020a1709066bd400b007c0e23ebbd6mr11635301ejs.551.1670365448845; Tue, 06 Dec 2022 14:24:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670365448; cv=none; d=google.com; s=arc-20160816; b=uh+uFpBKBeNgwhRFXF1RXZzbSj791+QJxdZ1kKOYIO5lo6aiikzNcZxPmjEPh/HmuI qIgtE2O44LBHLPmPwFeKf0VO3HxiQmN1R2FMnI6pBJads89Jxntq+E133PPs+fA3dEZu kSfwwNlPiBpOTXfiIdAK8uvY4H6tMRjShBRZwxIE9Rkm+GsUgH5DiaauBQroIlx8V+d5 qK+v8K/d76SWgJJbt4c4DtPxueEGYNtb2dtC/Rl7qtG6JOrxVH4Yaq3BzfkMgkYmo94D LCNchvLr//TwZgfm3ryfujrRkXWbmBUEV1lMXPH8MlPzZ2fBjBoPSCS6/Wt3s7IOp6/g qyvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=G69+HhR0ihvNSw0RKAj3g6Wwbd/2ML3s12VKKEbCzJc=; b=eiNMS4zGUIYAKviriwbY3xd2dRTmnKzqT4evcT+WFIs5bBOzBgZZWEdg8Dm+ZhGoO4 AQkeN3op/eaz191cWX1f3R93YHmOM79OV+AaH2yeRoIi02znIPcmCDiaUPfKTZrSJnAo Xesoz3Gs0Bo9Z76xplxt6c5hOBe2yX74ou5DMMV5B+9dHlaiYDiOs4awB8uewGFxwQ9Z AiS/aY2lnUGj3obVNHlyHXLIIrlr3HARIFYOaWgGHoMt0KfCuBNb/6lafyfxFSPYPiZB q7376c6kGFGic+kqpZV24dASpviMAMstuvDbASok4GVTdzw7vWmzPy8B3V81Fh8s6QvJ AOjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Cyf1Huo8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt20-20020a0564020a5400b004690be1cef0si2589008edb.84.2022.12.06.14.23.47; Tue, 06 Dec 2022 14:24:08 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=Cyf1Huo8; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229866AbiLFWNn (ORCPT + 77 others); Tue, 6 Dec 2022 17:13:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229496AbiLFWNl (ORCPT ); Tue, 6 Dec 2022 17:13:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E946C2C124; Tue, 6 Dec 2022 14:13:39 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9A950B81B3B; Tue, 6 Dec 2022 22:13:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AB50C433D7; Tue, 6 Dec 2022 22:13:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670364817; bh=aaEuMflWG3h9lGdqzzs38XODN98pr4Rxd/gte/nw7TI=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Cyf1Huo8bUIvhPTTxdlAnMIoObwq8hm8lFH2xRlU+32//CwMWZoj0N+zd5sa6NwDv 3Wq3H0x6TCtNEnXCJONRinvp16pjnlgj6qc1/B0rT9b73MwJwl97YbZgIq359Wl72V XlQH/pu7lDqBjUfTDqHlKDTond8AQy82ghJG5MdF8FLlN9C7x6w98HZGg1oWGgjzS6 H2zt7DhAjGDWqAI/vckpY4bDJlfGqQGWhaVCZ7FKsLsEFgQKVOb5tyKa8jxgYaJCiB QH5JUi6AJF6o7qoZ39xzM4QeSa9mKLpufnMdk1KrSZqUajZB2x0AnxT3CuAUy6LlKL dUlHI/RmVZCjg== Date: Tue, 6 Dec 2022 16:13:35 -0600 From: Bjorn Helgaas To: Zhuo Chen , James Smart , Dick Kennedy Cc: sathyanarayanan.kuppuswamy@linux.intel.com, bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com, fancer.lancer@gmail.com, jdmason@kudzu.us, dave.jiang@intel.com, allenbh@gmail.com, jejb@linux.ibm.com, martin.petersen@oracle.com, linux-scsi@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, ntb@lists.linux.dev, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH v3 4/9] scsi: lpfc: Change to use pci_aer_clear_uncorrect_error_status() Message-ID: <20221206221335.GA1363005@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220928105946.12469-5-chenzhuo.1@bytedance.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 [moved James, Dick, LPFC supporters to "to"] On Wed, Sep 28, 2022 at 06:59:41PM +0800, Zhuo Chen wrote: > lpfc_aer_cleanup_state() requires clearing both fatal and non-fatal > uncorrectable error status. I don't know what the point of lpfc_aer_cleanup_state() is. AER errors should be handled and cleared by the PCI core, not by individual drivers. Only lpfc, liquidio, and sky2 touch PCI_ERR_UNCOR_STATUS. But lpfc_aer_cleanup_state() is visible in the "lpfc_aer_state_cleanup" sysfs file, so removing it would break any userspace that uses it. If we can rely on the PCI core to clean up AER errors itself (admittedly, that might be a big "if"), maybe lpfc_aer_cleanup_state() could just become a no-op? Any comment from the LPFC folks? Ideally, I would rather not export pci_aer_clear_nonfatal_status() or pci_aer_clear_uncorrect_error_status() outside the PCI core at all. > But using pci_aer_clear_nonfatal_status() > will only clear non-fatal error status. To clear both fatal and > non-fatal error status, use pci_aer_clear_uncorrect_error_status(). > > Signed-off-by: Zhuo Chen > --- > drivers/scsi/lpfc/lpfc_attr.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c > index 09cf2cd0ae60..d835cc0ba153 100644 > --- a/drivers/scsi/lpfc/lpfc_attr.c > +++ b/drivers/scsi/lpfc/lpfc_attr.c > @@ -4689,7 +4689,7 @@ static DEVICE_ATTR_RW(lpfc_aer_support); > * Description: > * If the @buf contains 1 and the device currently has the AER support > * enabled, then invokes the kernel AER helper routine > - * pci_aer_clear_nonfatal_status() to clean up the uncorrectable > + * pci_aer_clear_uncorrect_error_status() to clean up the uncorrectable > * error status register. > * > * Notes: > @@ -4715,7 +4715,7 @@ lpfc_aer_cleanup_state(struct device *dev, struct device_attribute *attr, > return -EINVAL; > > if (phba->hba_flag & HBA_AER_ENABLED) > - rc = pci_aer_clear_nonfatal_status(phba->pcidev); > + rc = pci_aer_clear_uncorrect_error_status(phba->pcidev); > > if (rc == 0) > return strlen(buf); > -- > 2.30.1 (Apple Git-130) >