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
25 struct aer_capability_regs
{
33 struct pcie_tlp_log header_log
;
40 int pcie_read_tlp_log(struct pci_dev
*dev
, int where
, struct pcie_tlp_log
*log
);
42 #if defined(CONFIG_PCIEAER)
43 int pci_aer_clear_nonfatal_status(struct pci_dev
*dev
);
44 int pcie_aer_is_native(struct pci_dev
*dev
);
46 static inline int pci_aer_clear_nonfatal_status(struct pci_dev
*dev
)
50 static inline int pcie_aer_is_native(struct pci_dev
*dev
) { return 0; }
53 void pci_print_aer(struct pci_dev
*dev
, int aer_severity
,
54 struct aer_capability_regs
*aer
);
55 int cper_severity_to_aer(int cper_severity
);
56 void aer_recover_queue(int domain
, unsigned int bus
, unsigned int devfn
,
57 int severity
, struct aer_capability_regs
*aer_regs
);