Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp381845rwb; Wed, 28 Sep 2022 04:09:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68E7EQyq/z5XuKziTY4H9O+IwCGZKDwgL1DgtycagEmxFdNZj9FrQ+M8NJH7FpCdo8trVo X-Received: by 2002:a17:903:11c8:b0:179:de93:bd7e with SMTP id q8-20020a17090311c800b00179de93bd7emr11978468plh.95.1664363365190; Wed, 28 Sep 2022 04:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664363365; cv=none; d=google.com; s=arc-20160816; b=tLbyNEv9la5qWyMYnvnDJup8gXn25SSBo2Y8UduhQ+KjEzrhnnhde4kURYBMSGsErV auTXGCZNHk3LXb5WJph7XW4AdUD2l6onWw7Phhx6SkjY8xFHvfdtudw3z00L3vxeT8mN WmvaJFnj7e7a1QzybSOU0lIdNVi1KeexmkX06KqMRuFzML10NDQ0H7eDyYF1cOZbg0Ux vb3d92Ow9QhdgRczMG1e9SA4EMjtsMKhn45Iaq84g5AvLiloJLVU3k+1uQ0j4hXpsP6d RuKyHq/d1QTs48mj4DrVHAw1VQUADnbpnW8NCq5oL8/qyl4ivwaQ4nx3kX2+2PfUmW9r GPKA== 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:dkim-signature; bh=fo4HmuLb/yqh2kDNnoKinrIdDSvba5fowzMna9C2QUg=; b=vg4n86nudbkwbZCuh/PbhJxQQWZrcIzoYs9CWwCs9TR/9tBs44RLE5aLdoE0Sjqj7o xfhDnibbE8en5C3XdmgY8ykFuKpEwiFhfwbO8jp8eDfvC1h+bzcGVPA8Pz+BOKU2uo2p GVICBAE6zPmKWmgu7XIrP7WVAPFQHW2BHolEHJYwU7NI7zgkGRVBk5zAy05CXikeIMwe L5gxULliewbnF1pk8hbH8lvW/7Gj4pMlfvpMa/iUD9m4VcLxTXLk77egOMILgTpNYV1u P3Ri9KVcYzfBLKHy+G2/YPdC+hYo/o9KeNVff5LIRpWXKtDt39oTTsgpKzZ3591DVisJ rcEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=SJyC2mJG; 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 h5-20020a625305000000b0053e29668420si2391664pfb.94.2022.09.28.04.09.13; Wed, 28 Sep 2022 04:09:25 -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=SJyC2mJG; 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 S234067AbiI1LBP (ORCPT + 99 others); Wed, 28 Sep 2022 07:01:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234061AbiI1LAr (ORCPT ); Wed, 28 Sep 2022 07:00:47 -0400 Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF0507EFCC for ; Wed, 28 Sep 2022 03:59:59 -0700 (PDT) Received: by mail-pj1-x1032.google.com with SMTP id u92so2665209pjh.3 for ; Wed, 28 Sep 2022 03:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=fo4HmuLb/yqh2kDNnoKinrIdDSvba5fowzMna9C2QUg=; b=SJyC2mJGff3oqgJGbJ2CIG5odbv/+k+1zDOycX2oUS4T2LLeoqU3dGE1ZjN4uoa9Nl L1NfMbijmpRASuYUSNvspDxj8CM+rmq+/DcgF1yNslYBahnv7Jb+1k0YpGpi6O/VoXyp GCrRgidVi8vWTLkSPgT8qrawa1Xty5l7bByP6CdG/DOYYe0SpUcqP9wk9r9hQ/Ioqxav LHNhhGOS8rnJwxzopvjmpsVw3e+VTF33QopJR0QRACOzuMj/kpD0CM6KmvStlb4Og72e DEiv3fFrzOIVDxsWfTKuL64jyIYcqAOGQi6b6EG9tMIphMP2u9SnfieVTmst7pefV5rv zROQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=fo4HmuLb/yqh2kDNnoKinrIdDSvba5fowzMna9C2QUg=; b=E7PzimDNakovBBv/dajlgl9sWGR+PrHODcX0P5rHSE+TzW7nmExu6DJCQDlnaWpL8m Hsgv82vKB7kXab4u1gLFmK5/iz+VHzFkJtdYTMFBTvbrOQ7ubEQv+2QpLya+sTqQJQgy cfIKZmCEoNYwtx3HE0Ts27tHOS33cABz9xA+fdN5oFi0heJS5slytl52TGS/OVnlJCmY T2U2R2uJdvPlgXElQibMuIqxh1Sddb0cVN8O1twXsEO+2NRYv1x6BqJ31ccVimCXGQuX jafL7NzfmWUgQwuVmdk0I+4Y0JUDYcyWvQU7TPXqbUQTsYPVFpdkiqPtgE9lzUOErwxq tM6Q== X-Gm-Message-State: ACrzQf2xHTb5gZeJ4eupkp4m0QqHBnvI1lc0Y0kuFxFQMEO/ZfBfEJcj rnMiOZr0SCehBwDCNgPS873PGA== X-Received: by 2002:a17:90b:38c3:b0:205:d6b5:582d with SMTP id nn3-20020a17090b38c300b00205d6b5582dmr9053345pjb.229.1664362798761; Wed, 28 Sep 2022 03:59:58 -0700 (PDT) Received: from C02F63J9MD6R.bytedance.net ([61.120.150.77]) by smtp.gmail.com with ESMTPSA id b13-20020a170902d50d00b00177efb56475sm1539524plg.85.2022.09.28.03.59.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Sep 2022 03:59:58 -0700 (PDT) From: Zhuo Chen To: 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, james.smart@broadcom.com, dick.kennedy@broadcom.com, jejb@linux.ibm.com, martin.petersen@oracle.com Cc: chenzhuo.1@bytedance.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 Subject: [PATCH v3 0/9] PCI/AER: Fix and optimize usage of status clearing api Date: Wed, 28 Sep 2022 18:59:37 +0800 Message-Id: <20220928105946.12469-1-chenzhuo.1@bytedance.com> X-Mailer: git-send-email 2.30.1 (Apple Git-130) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 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. 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)