1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2006 Intel Corp.
4 * Tom Long Nguyen (tom.l.nguyen@intel.com)
5 * Zhang Yanmin (yanmin.zhang@intel.com)
11 #include <linux/errno.h>
12 #include <linux/types.h>
14 #define AER_NONFATAL 0
16 #define AER_CORRECTABLE 2
20 struct aer_header_log_regs
{
27 struct aer_capability_regs
{
35 struct aer_header_log_regs header_log
;
42 #if defined(CONFIG_PCIEAER)
43 /* PCIe port driver needs this function to enable AER */
44 int pci_enable_pcie_error_reporting(struct pci_dev
*dev
);
45 int pci_disable_pcie_error_reporting(struct pci_dev
*dev
);
46 int pci_cleanup_aer_uncorrect_error_status(struct pci_dev
*dev
);
47 int pci_cleanup_aer_error_status_regs(struct pci_dev
*dev
);
49 static inline int pci_enable_pcie_error_reporting(struct pci_dev
*dev
)
53 static inline int pci_disable_pcie_error_reporting(struct pci_dev
*dev
)
57 static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev
*dev
)
61 static inline int pci_cleanup_aer_error_status_regs(struct pci_dev
*dev
)
67 void cper_print_aer(struct pci_dev
*dev
, int aer_severity
,
68 struct aer_capability_regs
*aer
);
69 int cper_severity_to_aer(int cper_severity
);
70 void aer_recover_queue(int domain
, unsigned int bus
, unsigned int devfn
,
71 int severity
, struct aer_capability_regs
*aer_regs
);