diff options
Diffstat (limited to 'drivers/pci/pcie/aer/aerdrv.h')
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.h | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/drivers/pci/pcie/aer/aerdrv.h b/drivers/pci/pcie/aer/aerdrv.h index bbd7428ca2d0..bd833ea3ba49 100644 --- a/drivers/pci/pcie/aer/aerdrv.h +++ b/drivers/pci/pcie/aer/aerdrv.h | |||
@@ -16,12 +16,9 @@ | |||
16 | #define AER_NONFATAL 0 | 16 | #define AER_NONFATAL 0 |
17 | #define AER_FATAL 1 | 17 | #define AER_FATAL 1 |
18 | #define AER_CORRECTABLE 2 | 18 | #define AER_CORRECTABLE 2 |
19 | #define AER_UNCORRECTABLE 4 | ||
20 | #define AER_ERROR_MASK 0x001fffff | ||
21 | #define AER_ERROR(d) (d & AER_ERROR_MASK) | ||
22 | 19 | ||
23 | /* Root Error Status Register Bits */ | 20 | /* Root Error Status Register Bits */ |
24 | #define ROOT_ERR_STATUS_MASKS 0x0f | 21 | #define ROOT_ERR_STATUS_MASKS 0x0f |
25 | 22 | ||
26 | #define SYSTEM_ERROR_INTR_ON_MESG_MASK (PCI_EXP_RTCTL_SECEE| \ | 23 | #define SYSTEM_ERROR_INTR_ON_MESG_MASK (PCI_EXP_RTCTL_SECEE| \ |
27 | PCI_EXP_RTCTL_SENFEE| \ | 24 | PCI_EXP_RTCTL_SENFEE| \ |
@@ -32,8 +29,6 @@ | |||
32 | #define ERR_COR_ID(d) (d & 0xffff) | 29 | #define ERR_COR_ID(d) (d & 0xffff) |
33 | #define ERR_UNCOR_ID(d) (d >> 16) | 30 | #define ERR_UNCOR_ID(d) (d >> 16) |
34 | 31 | ||
35 | #define AER_SUCCESS 0 | ||
36 | #define AER_UNSUCCESS 1 | ||
37 | #define AER_ERROR_SOURCES_MAX 100 | 32 | #define AER_ERROR_SOURCES_MAX 100 |
38 | 33 | ||
39 | #define AER_LOG_TLP_MASKS (PCI_ERR_UNC_POISON_TLP| \ | 34 | #define AER_LOG_TLP_MASKS (PCI_ERR_UNC_POISON_TLP| \ |
@@ -43,13 +38,6 @@ | |||
43 | PCI_ERR_UNC_UNX_COMP| \ | 38 | PCI_ERR_UNC_UNX_COMP| \ |
44 | PCI_ERR_UNC_MALF_TLP) | 39 | PCI_ERR_UNC_MALF_TLP) |
45 | 40 | ||
46 | /* AER Error Info Flags */ | ||
47 | #define AER_TLP_HEADER_VALID_FLAG 0x00000001 | ||
48 | #define AER_MULTI_ERROR_VALID_FLAG 0x00000002 | ||
49 | |||
50 | #define ERR_CORRECTABLE_ERROR_MASK 0x000031c1 | ||
51 | #define ERR_UNCORRECTABLE_ERROR_MASK 0x001ff010 | ||
52 | |||
53 | struct header_log_regs { | 41 | struct header_log_regs { |
54 | unsigned int dw0; | 42 | unsigned int dw0; |
55 | unsigned int dw1; | 43 | unsigned int dw1; |
@@ -61,11 +49,20 @@ struct header_log_regs { | |||
61 | struct aer_err_info { | 49 | struct aer_err_info { |
62 | struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES]; | 50 | struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES]; |
63 | int error_dev_num; | 51 | int error_dev_num; |
64 | u16 id; | 52 | |
65 | int severity; /* 0:NONFATAL | 1:FATAL | 2:COR */ | 53 | unsigned int id:16; |
66 | int flags; | 54 | |
55 | unsigned int severity:2; /* 0:NONFATAL | 1:FATAL | 2:COR */ | ||
56 | unsigned int __pad1:5; | ||
57 | unsigned int multi_error_valid:1; | ||
58 | |||
59 | unsigned int first_error:5; | ||
60 | unsigned int __pad2:2; | ||
61 | unsigned int tlp_header_valid:1; | ||
62 | |||
67 | unsigned int status; /* COR/UNCOR Error Status */ | 63 | unsigned int status; /* COR/UNCOR Error Status */ |
68 | struct header_log_regs tlp; /* TLP Header */ | 64 | unsigned int mask; /* COR/UNCOR Error Mask */ |
65 | struct header_log_regs tlp; /* TLP Header */ | ||
69 | }; | 66 | }; |
70 | 67 | ||
71 | struct aer_err_source { | 68 | struct aer_err_source { |
@@ -125,6 +122,7 @@ extern void aer_delete_rootport(struct aer_rpc *rpc); | |||
125 | extern int aer_init(struct pcie_device *dev); | 122 | extern int aer_init(struct pcie_device *dev); |
126 | extern void aer_isr(struct work_struct *work); | 123 | extern void aer_isr(struct work_struct *work); |
127 | extern void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); | 124 | extern void aer_print_error(struct pci_dev *dev, struct aer_err_info *info); |
125 | extern void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info); | ||
128 | extern irqreturn_t aer_irq(int irq, void *context); | 126 | extern irqreturn_t aer_irq(int irq, void *context); |
129 | 127 | ||
130 | #ifdef CONFIG_ACPI | 128 | #ifdef CONFIG_ACPI |
@@ -136,4 +134,4 @@ static inline int aer_osc_setup(struct pcie_device *pciedev) | |||
136 | } | 134 | } |
137 | #endif | 135 | #endif |
138 | 136 | ||
139 | #endif //_AERDRV_H_ | 137 | #endif /* _AERDRV_H_ */ |