linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Vidya Sagar <vidyas@nvidia.com>
To: <bhelgaas@google.com>, <ruscur@russell.cc>, <oohall@gmail.com>,
	<treding@nvidia.com>, <jonathanh@nvidia.com>
Cc: mmaddireddy@nvidia.com, kthota@nvidia.com,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	vidyas@nvidia.com, vsethi@nvidia.com,
	linuxppc-dev@lists.ozlabs.org, sagar.tv@gmail.com
Subject: [PATCH V2] PCI/AER: Configure ECRC only AER is native
Date: Thu, 12 Jan 2023 12:51:11 +0530	[thread overview]
Message-ID: <20230112072111.20063-1-vidyas@nvidia.com> (raw)
In-Reply-To: <20230111203116.4896-1-vidyas@nvidia.com>

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 <vidyas@nvidia.com>
---
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


  parent reply	other threads:[~2023-01-12  7:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 20:31 [PATCH V1] PCI/AER: Configure ECRC only AER is native Vidya Sagar
2023-01-11 21:42 ` Sathyanarayanan Kuppuswamy
2023-01-11 23:10   ` Bjorn Helgaas
2023-01-11 23:27     ` Sathyanarayanan Kuppuswamy
2023-01-12  3:33       ` Vidya Sagar
2023-01-12  3:48         ` Sathyanarayanan Kuppuswamy
2023-01-12  4:59           ` Vidya Sagar
2023-01-12  5:06             ` Sathyanarayanan Kuppuswamy
2023-01-12  7:12               ` Vidya Sagar
2023-01-12 18:23       ` Bjorn Helgaas
2023-01-12  7:21 ` Vidya Sagar [this message]
2023-01-12 18:25   ` [PATCH V2] " Bjorn Helgaas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230112072111.20063-1-vidyas@nvidia.com \
    --to=vidyas@nvidia.com \
    --cc=bhelgaas@google.com \
    --cc=jonathanh@nvidia.com \
    --cc=kthota@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mmaddireddy@nvidia.com \
    --cc=oohall@gmail.com \
    --cc=ruscur@russell.cc \
    --cc=sagar.tv@gmail.com \
    --cc=treding@nvidia.com \
    --cc=vsethi@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).