Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp807206rwb; Wed, 28 Sep 2022 09:18:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6/zeHvdF8EUfnM22qtjKCmEQjW32pY3JGTKaTmVf5dlS5xWER6qgDBWL3kbznUOqdgfJz2 X-Received: by 2002:a17:907:3e28:b0:782:81d:a4f9 with SMTP id hp40-20020a1709073e2800b00782081da4f9mr28252873ejc.558.1664381918851; Wed, 28 Sep 2022 09:18:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664381918; cv=none; d=google.com; s=arc-20160816; b=pQrLii76VtFKoN1YW28rK4FEwArIKcs8PHH5F+AIglS0atkIzn+mNSblT+5IUmu5bG 0gGXhnTrJ6UzXhf+GzTuQ+mJjl38dIyNhfH7NPL1TbFZr2L/dQNxxC1YUFcppW4nJ06n RsVJ+8DR1Yyk59GPIXkIg5mJu37czqH7iwrZBzrFDdJwmRzapSv+DSE66Q3rLM4IROH9 CUxMay52saTIcsMddpSeYhZp58MMlGKuAkPT3L+naQ3YphmTgxDVNfEtTflIXWuPKrdy eSzTO3xgxYq5RNEAXqZJD7anIL7hkNsG973wXEdX1TUSRJRkPem2e6PCDephgWlkiwaQ EZ4w== 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=QSAEb2hPZjK1ev/lBZ3te+y9kjBYl6H9pPRLwr+M8HM=; b=pDc+HiwHEqINezvR5YSfKCO58rGrIk+8T7M93mVym8JxFZmYJxU3xNa0UHKlbgI5dk cw2QNdqsblF7RKZBj+Bmjt4WJF76FsVQ+Xc/3jMBtQgdBWcJddp2IqUVqfIG8haijDJW Yq3CuMaeGt80MRkS+QCM3Q9a01yuYly1NXVb79fl/fmWfRZKlYxiVwPE3vfFyo8i1cUh ORzD/tNwqUmN1+vpnYm2YE3HGiaGQT1+B81KVVfPaw8kHlj4BeKKCEan9jSMLkYYWyUo Z7yKdYK7wRztoD7LYvkiLvoPHW7EQ9s2OWPw45WFgklUmBVlRw1uUyZCcPLOHQx275Cz HBvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=zVPtZAzw; 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 f6-20020a056402354600b00456dd68e6ebsi5886911edd.289.2022.09.28.09.18.11; Wed, 28 Sep 2022 09:18:38 -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=zVPtZAzw; 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 S230063AbiI1PyS (ORCPT + 99 others); Wed, 28 Sep 2022 11:54:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233247AbiI1PyO (ORCPT ); Wed, 28 Sep 2022 11:54:14 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B857DCEA6 for ; Wed, 28 Sep 2022 08:54:12 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id b5so12586943pgb.6 for ; Wed, 28 Sep 2022 08:54:12 -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=QSAEb2hPZjK1ev/lBZ3te+y9kjBYl6H9pPRLwr+M8HM=; b=zVPtZAzw49EHbsqZqHSTXnYA4fCJVgV0ehiFbcHyaUHvs7WCLafoa7uK8ML2BgDos4 U3FTz1fzfHSRaG2aOZCd8/5mNO7Axa7rX0KW2D5mLDTSbLVEtkUQOx6vb/WyEcOgh4Uz G3MWAF5BUbXqgxQMBe6juX25LkAKPlRyvo63Wzt+Yv3rhBiZNaVmN2vC4IinqkH8thMI fcW+q5fTcp+dYGYs/mLBTunIT/PtRbJH+KvZjES40kJqik7SN1sR/JSsLEQ/r4w+dY53 yZdvlKWU6xrLQVlPNbzhwy4LOQyi9Q3bXls/2CE0MyPKoxajKOawzKhM6WGhLzi7H/dw P2bA== 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=QSAEb2hPZjK1ev/lBZ3te+y9kjBYl6H9pPRLwr+M8HM=; b=XuY7Bmvqy0hQ6AGaocElXtJXO2mY/QGjOZHNZXpEu60Bf+9jiQrUO7gIFNEcosEbqq jbtStWaBbMEKq1AfStuuvXfqOHFzI1TjWssI7O9TJkG17VNQRxKk+OSOe488TzDul8au QaH5m8Xm0GisQSOfT7esQZFNefLqkAaKA6i5rLjJCyRMJ9SK6SG23/0QF5b6v1yRJEll rz3o0AXaKDEmPvHtxIxhbE0IMByQSXPtWZR+63BGlYafS88lwrH3j5UA1Q4jDEb2cak3 oJIi7FzT8l5zwYBwbvf054Fhe/kHp3DIIUQey/sB//r1P4AnlshMWKuABok2kYRbEVIU HHkg== X-Gm-Message-State: ACrzQf15pteBTH8GmxS/f63MVBr64kLZTMaZtuftlmXAysr2vV5P1Asz ZPtDyJesLOSSNYBjXJxy9WnKQA== X-Received: by 2002:a63:5c07:0:b0:43f:6af:7590 with SMTP id q7-20020a635c07000000b0043f06af7590mr7563656pgb.272.1664380451650; Wed, 28 Sep 2022 08:54:11 -0700 (PDT) Received: from [10.2.223.68] ([61.120.150.77]) by smtp.gmail.com with ESMTPSA id i28-20020a056a00005c00b0053e72ed5252sm4231499pfk.42.2022.09.28.08.54.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 28 Sep 2022 08:54:11 -0700 (PDT) Message-ID: Date: Wed, 28 Sep 2022 23:54:02 +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 v3 0/9] PCI/AER: Fix and optimize usage of status clearing api Content-Language: en-US To: Serge Semin , bhelgaas@google.com, Sathyanarayanan Kuppuswamy Cc: ruscur@russell.cc, oohall@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, 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: <20220928105946.12469-1-chenzhuo.1@bytedance.com> <20220928110623.b3vocoubasrshyzk@mobilestation> From: Zhuo Chen In-Reply-To: <20220928110623.b3vocoubasrshyzk@mobilestation> 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=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 9/28/22 7:06 PM, Serge Semin wrote: > On Wed, Sep 28, 2022 at 06:59:37PM +0800, Zhuo Chen wrote: >> Hello. >> >> Here comes patch v3, which contains some fixes and optimizations of >> aer api usage. The v1 and v2 can be found on the mailing list. >> >> v3: >> - Modifications to comments proposed by Sathyanarayanan. > >> Remove >> pci_aer_clear_nonfatal_status() call in NTB and improve commit log. > > Failed to see who has requested that... > > -Sergey > Hi, Sergey Currently other vendor drivers do not clear error status in their own init code, I don't exactly know what is special reason for clearing error status during init code in ntb driver. An evidence is in pci_aer_init(), PCI core driver has do pci_aer_clear_status() and pci_enable_pcie_error_reporting() in common process. So vendor drivers don't need to do again. But I don't know the reason why many vendor drivers reserve pci_enable_pcie_error_reporting() after commit f26e58bf6f54 ("PCI/AER: Enable error reporting when AER is native"). Do they need to be removed? Could Bjorn and Sathyanarayanan help look into it, thanks a lot. Thanks. >> >> v2: >> - Modifications to comments proposed by Bjorn. Split patch into more >> obvious parts. >> >> Zhuo Chen (9): >> PCI/AER: Add pci_aer_clear_uncorrect_error_status() to PCI core >> PCI/DPC: Use pci_aer_clear_uncorrect_error_status() to clear >> uncorrectable error status >> NTB: Remove pci_aer_clear_nonfatal_status() call >> scsi: lpfc: Change to use pci_aer_clear_uncorrect_error_status() >> PCI/AER: Unexport pci_aer_clear_nonfatal_status() >> PCI/AER: Move check inside pcie_clear_device_status(). >> PCI/AER: Use pcie_aer_is_native() to judge whether OS owns AER >> PCI/ERR: Clear fatal error status when pci_channel_io_frozen >> PCI/AER: Refine status clearing process with api >> >> drivers/ntb/hw/idt/ntb_hw_idt.c | 2 -- >> drivers/pci/pci.c | 7 +++-- >> drivers/pci/pci.h | 2 ++ >> drivers/pci/pcie/aer.c | 45 +++++++++++++++++++-------------- >> drivers/pci/pcie/dpc.c | 3 +-- >> drivers/pci/pcie/err.c | 15 ++++------- >> drivers/pci/pcie/portdrv_core.c | 3 +-- >> drivers/scsi/lpfc/lpfc_attr.c | 4 +-- >> include/linux/aer.h | 4 +-- >> 9 files changed, 44 insertions(+), 41 deletions(-) >> >> -- >> 2.30.1 (Apple Git-130) >> -- Zhuo Chen