PCI: Add pci_disable_parity()
authorBjorn Helgaas <bhelgaas@google.com>
Tue, 30 Mar 2021 17:43:16 +0000 (12:43 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 31 Mar 2021 17:27:03 +0000 (12:27 -0500)
commit1fd3dde5e270ad08f1406f921c9a2cda154fcea9
tree776f7c31efd8cc6d7b201461c3c718ef120e9994
parentc99e755a4a4c165cad6effb39faffd0f3377c02d
PCI: Add pci_disable_parity()

Add pci_disable_parity() to disable reporting of parity errors for a
device by clearing PCI_COMMAND_PARITY.

The device will still set PCI_STATUS_DETECTED_PARITY when it detects
a parity error or receives a Poisoned TLP, but it will not set
PCI_STATUS_PARITY, which means it will not assert PERR#
(conventional PCI) or report Poisoned TLPs (PCIe).

Based-on: https://lore.kernel.org/linux-arm-kernel/d375987c-ea4f-dd98-4ef8-99b2fbfe7c33@gmail.com/
Based-on-patch-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/20210330174318.1289680-2-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci.c
include/linux/pci.h