Skip to content

Commit

Permalink
PCI/AER: Configure ECRC for every device
Browse files Browse the repository at this point in the history
Move pcie_set_ecrc_checking() to pci_aer_init() to make sure that
pcie_set_ecrc_checking() is called for each PCIe device, including
hot-added devices.

Link: https://lore.kernel.org/r/20220125071820.2247260-2-sr@denx.de
Signed-off-by: Stefan Roese <sr@denx.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Pali Rohár <pali@kernel.org>
Cc: Bharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Yao Hongbo <yaohongbo@linux.alibaba.com>
Cc: Naveen Naidu <naveennaidu479@gmail.com>
  • Loading branch information
Stefan Roese authored and Bjorn Helgaas committed Jul 11, 2022
1 parent 6cd514e commit 9ffb98f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/pci/pcie/aer.c
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ void pci_aer_init(struct pci_dev *dev)
pci_add_ext_cap_save_buffer(dev, PCI_EXT_CAP_ID_ERR, sizeof(u32) * n);

pci_aer_clear_status(dev);

pcie_set_ecrc_checking(dev);
}

void pci_aer_exit(struct pci_dev *dev)
Expand Down Expand Up @@ -1228,9 +1230,6 @@ static int set_device_error_reporting(struct pci_dev *dev, void *data)
pci_disable_pcie_error_reporting(dev);
}

if (enable)
pcie_set_ecrc_checking(dev);

return 0;
}

Expand Down

0 comments on commit 9ffb98f

Please sign in to comment.