Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp729436rwb; Thu, 12 Jan 2023 11:29:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXtdPYjLcUfb7dshjQK5/0VlHmCS0/u39B1SqjsBGdRyYwQqvpxH0x94O9bl2bWR/5/Y28sL X-Received: by 2002:a05:6a20:d399:b0:ac:7539:389f with SMTP id iq25-20020a056a20d39900b000ac7539389fmr100388551pzb.56.1673551792181; Thu, 12 Jan 2023 11:29:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673551792; cv=none; d=google.com; s=arc-20160816; b=YL/tcKRePysCBA/Ui4FWxE9g1PbSNGjdPvN+WlNy7MyZuhyhgOoplZ2UlAJdn5aS2i SU2k9BjnEtYn+GBYB3VlWLQk9H8wZhk555i2OrEUGyGpESZGihes9JfIm8VjFC3/LlXv 8QZ/ye22BVjK2/j3kjI06huz/LqAi/CToLLLsgD5aSRFSP6xylUd0gPyis8yFLPr8kO1 Q7DwmCxpMSJomBi0HRsae3dvp4vB0U/3qxD8KNModsim8RDx7/O2t6gGOR5O8HI5QqwP tkTDYq23ZH8w7zqRbgtGDwwU6tLi0Yzbr2x99aqcQN3Scc3UeA8OKWe9lE6jCBpewHxs llUQ== 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=/if6t5jS/ktvsgtOZ3im1OX1kpnfYN7C4bFSNpafnxM=; b=HSFEfmse8hdeTSeqiDb6BG8aKkx4M6wTvAYhMQQVFp6SmfB1zJpvy2OVSvtL7ugNuV ggqmuhaXQqtIcAScVgSXcRfB6dRyBzFEehJV0m5PuCg39SSI2bouwjY5tusXppFPRTag 7TTFox4yMLhAayxEUDi2qe4Ef0h/4iif/1gWLdnMbiYWGU9iXxn9SJyQqxt5XIFvTBRv 9P0lBHgKA9koBc0uUomSLD416Y9uoXqG3wIJ4xBxC5ceXkP0Wsabcp1NvTYNe69oSiUq dIcfkyWNtKTHzt714dmx0qJSJtahP90WQQpn71s/idsuYHHOP9pTOYY/wXOAIpNqyvjh wfzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rXcTrjNc; 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 q9-20020a656a89000000b004a43c06daa0si19070456pgu.65.2023.01.12.11.29.45; Thu, 12 Jan 2023 11:29:52 -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=rXcTrjNc; 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 S232276AbjALS4B (ORCPT + 50 others); Thu, 12 Jan 2023 13:56:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232829AbjALSz3 (ORCPT ); Thu, 12 Jan 2023 13:55:29 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDC3287912; Thu, 12 Jan 2023 10:25:24 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 593DA6213B; Thu, 12 Jan 2023 18:25:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 867E5C433EF; Thu, 12 Jan 2023 18:25:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1673547923; bh=7E80cFZGxF2ybWEYKWVeToLIO7ZFtLVaNaJj6DWrgtE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=rXcTrjNcq6AOHbgz725RLARmoWDfgUQOF4mZ1FavcoZeG+r/Ahb5BWnkvg2lrlD3M xW/H2kQi+QifH3v7qlvSknWQs1ONJh/b3qZBjYPdekHFJplvzPuNm8a4fDBQWWWZBV 268pM833VrVzCS7stzhlbIvrmpsl9jgQhfq5Hjej0QtR/d1i+pyra6v4dvtncnGvim 12K9MDJKrqZ3+PWgeFHalHjtXjPA13RymwPO7QbnLvioyAJl4hx5J23sMiZJJdP8hA xgdn6KKmmY9w6/2Xl+bhh5eHM4fr8CRZ4ED9TTI5o3QUXh+aX/0heczhPxd/N8B28U RU0MXGL4cPOHQ== Date: Thu, 12 Jan 2023 12:25:22 -0600 From: Bjorn Helgaas To: Vidya Sagar Cc: bhelgaas@google.com, ruscur@russell.cc, oohall@gmail.com, treding@nvidia.com, jonathanh@nvidia.com, mmaddireddy@nvidia.com, kthota@nvidia.com, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, vsethi@nvidia.com, linuxppc-dev@lists.ozlabs.org, sagar.tv@gmail.com Subject: Re: [PATCH V2] PCI/AER: Configure ECRC only AER is native Message-ID: <20230112182522.GA1778254@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230112072111.20063-1-vidyas@nvidia.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 On Thu, Jan 12, 2023 at 12:51:11PM +0530, Vidya Sagar wrote: > As the ECRC configuration bits are part of AER registers, configure > ECRC only if AER is natively owned by the kernel. > > Signed-off-by: Vidya Sagar Applied to pci/aer for v6.3, thanks! > --- > v2: > * Updated kernel-parameters.txt document based on Bjorn's suggestion > > Documentation/admin-guide/kernel-parameters.txt | 4 +++- > drivers/pci/pcie/aer.c | 3 +++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 426fa892d311..8f85a1230525 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -4242,7 +4242,9 @@ > specified, e.g., 12@pci:8086:9c22:103c:198f > for 4096-byte alignment. > ecrc= Enable/disable PCIe ECRC (transaction layer > - end-to-end CRC checking). > + end-to-end CRC checking). Only effective if > + OS has native AER control (either granted by > + ACPI _OSC or forced via "pcie_ports=native") > bios: Use BIOS/firmware settings. This is the > the default. > off: Turn ECRC off > diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c > index e2d8a74f83c3..730b47bdcdef 100644 > --- a/drivers/pci/pcie/aer.c > +++ b/drivers/pci/pcie/aer.c > @@ -184,6 +184,9 @@ static int disable_ecrc_checking(struct pci_dev *dev) > */ > void pcie_set_ecrc_checking(struct pci_dev *dev) > { > + if (!pcie_aer_is_native(dev)) > + return; > + > switch (ecrc_policy) { > case ECRC_POLICY_DEFAULT: > return; > -- > 2.17.1 >