aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorGravatar Bjorn Helgaas <bhelgaas@google.com> 2020-08-05 18:24:15 -0500
committerGravatar Bjorn Helgaas <bhelgaas@google.com> 2020-08-05 18:24:15 -0500
commitb0735e8d2c360b7b1343f299fb22df39f2a7797e (patch)
tree06ed4b5c84b6671038fc82876c4d4f97a47d5fcd /drivers/pci/pci.c
parentMerge branch 'pci/enumeration' (diff)
parentPCI/ERR: Clear PCIe Device Status errors only if OS owns AER (diff)
downloadlinux-b0735e8d2c360b7b1343f299fb22df39f2a7797e.tar.gz
linux-b0735e8d2c360b7b1343f299fb22df39f2a7797e.tar.bz2
linux-b0735e8d2c360b7b1343f299fb22df39f2a7797e.zip
Merge branch 'pci/error'
- Use pci_channel_state_t instead of enum pci_channel_state (Luc Van Oostenryck) - Simplify __aer_print_error() (Bjorn Helgaas) - Log AER correctable errors as warning, not error (Matt Jolly) - Rename pci_aer_clear_device_status() to pcie_clear_device_status() (Bjorn Helgaas) - Clear PCIe Device Status errors only if OS owns AER (Jonathan Cameron) * pci/error: PCI/ERR: Clear PCIe Device Status errors only if OS owns AER PCI/ERR: Rename pci_aer_clear_device_status() to pcie_clear_device_status() PCI/AER: Log correctable errors as warning, not error PCI/AER: Simplify __aer_print_error() PCI: Use 'pci_channel_state_t' instead of 'enum pci_channel_state'
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 73a862782214..bded45b62c8a 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2173,6 +2173,14 @@ int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state)
}
EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state);
+void pcie_clear_device_status(struct pci_dev *dev)
+{
+ u16 sta;
+
+ pcie_capability_read_word(dev, PCI_EXP_DEVSTA, &sta);
+ pcie_capability_write_word(dev, PCI_EXP_DEVSTA, sta);
+}
+
/**
* pcie_clear_root_pme_status - Clear root port PME interrupt status.
* @dev: PCIe root port or event collector.