Commit bba50659 authored by Vidya Sagar's avatar Vidya Sagar Committed by Bjorn Helgaas
Browse files

PCI/AER: Configure ECRC only if AER is native

As the ECRC configuration bits are part of AER registers, configure ECRC
only if AER is natively owned by the kernel.

Link: https://lore.kernel.org/r/20230112072111.20063-1-vidyas@nvidia.com


Signed-off-by: default avatarVidya Sagar <vidyas@nvidia.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 1b929c02
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -4296,7 +4296,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
+3 −0
Original line number Diff line number Diff line
@@ -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;