1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #define FC_REG_LINK_EVENT 0x0001
25 #define FC_REG_RSCN_EVENT 0x0002
26 #define FC_REG_CT_EVENT 0x0004
27 #define FC_REG_DUMP_EVENT 0x0010
28 #define FC_REG_TEMPERATURE_EVENT 0x0020
29 #define FC_REG_VPORTRSCN_EVENT 0x0040
30 #define FC_REG_ELS_EVENT 0x0080
31 #define FC_REG_FABRIC_EVENT 0x0100
32 #define FC_REG_SCSI_EVENT 0x0200
33 #define FC_REG_BOARD_EVENT 0x0400
34 #define FC_REG_ADAPTER_EVENT 0x0800
35 #define FC_REG_EVENT_MASK (FC_REG_LINK_EVENT | \
36 FC_REG_RSCN_EVENT | \
37 FC_REG_CT_EVENT | \
38 FC_REG_DUMP_EVENT | \
39 FC_REG_TEMPERATURE_EVENT | \
40 FC_REG_VPORTRSCN_EVENT | \
41 FC_REG_ELS_EVENT | \
42 FC_REG_FABRIC_EVENT | \
43 FC_REG_SCSI_EVENT | \
44 FC_REG_BOARD_EVENT | \
45 FC_REG_ADAPTER_EVENT)
46
47 #define LPFC_CRIT_TEMP 0x1
48 #define LPFC_THRESHOLD_TEMP 0x2
49 #define LPFC_NORMAL_TEMP 0x3
50
51
52
53
54
55
56
57
58
59
60 struct lpfc_rscn_event_header {
61 uint32_t event_type;
62 uint32_t payload_length;
63 uint32_t rscn_payload[];
64 };
65
66
67 struct lpfc_els_event_header {
68 uint32_t event_type;
69 uint32_t subcategory;
70 uint8_t wwpn[8];
71 uint8_t wwnn[8];
72 };
73
74
75 #define LPFC_EVENT_PLOGI_RCV 0x01
76 #define LPFC_EVENT_PRLO_RCV 0x02
77 #define LPFC_EVENT_ADISC_RCV 0x04
78 #define LPFC_EVENT_LSRJT_RCV 0x08
79 #define LPFC_EVENT_LOGO_RCV 0x10
80
81
82 struct lpfc_lsrjt_event {
83 struct lpfc_els_event_header header;
84 uint32_t command;
85 uint32_t reason_code;
86 uint32_t explanation;
87 };
88
89
90 struct lpfc_logo_event {
91 struct lpfc_els_event_header header;
92 uint8_t logo_wwpn[8];
93 };
94
95
96 struct lpfc_fabric_event_header {
97 uint32_t event_type;
98 uint32_t subcategory;
99 uint8_t wwpn[8];
100 uint8_t wwnn[8];
101 };
102
103
104 #define LPFC_EVENT_FABRIC_BUSY 0x01
105 #define LPFC_EVENT_PORT_BUSY 0x02
106 #define LPFC_EVENT_FCPRDCHKERR 0x04
107
108
109 struct lpfc_fcprdchkerr_event {
110 struct lpfc_fabric_event_header header;
111 uint32_t lun;
112 uint32_t opcode;
113 uint32_t fcpiparam;
114 };
115
116
117
118 struct lpfc_scsi_event_header {
119 uint32_t event_type;
120 uint32_t subcategory;
121 uint32_t lun;
122 uint8_t wwpn[8];
123 uint8_t wwnn[8];
124 };
125
126
127 #define LPFC_EVENT_QFULL 0x0001
128 #define LPFC_EVENT_DEVBSY 0x0002
129 #define LPFC_EVENT_CHECK_COND 0x0004
130 #define LPFC_EVENT_LUNRESET 0x0008
131 #define LPFC_EVENT_TGTRESET 0x0010
132 #define LPFC_EVENT_BUSRESET 0x0020
133 #define LPFC_EVENT_VARQUEDEPTH 0x0040
134
135
136 struct lpfc_scsi_varqueuedepth_event {
137 struct lpfc_scsi_event_header scsi_event;
138 uint32_t oldval;
139 uint32_t newval;
140 };
141
142
143 struct lpfc_scsi_check_condition_event {
144 struct lpfc_scsi_event_header scsi_event;
145 uint8_t opcode;
146 uint8_t sense_key;
147 uint8_t asc;
148 uint8_t ascq;
149 };
150
151
152 #define LPFC_EVENT_PORTINTERR 0x01
153
154
155 struct lpfc_board_event_header {
156 uint32_t event_type;
157 uint32_t subcategory;
158 };
159
160
161
162 #define LPFC_EVENT_ARRIVAL 0x01
163
164
165 struct lpfc_adapter_event_header {
166 uint32_t event_type;
167 uint32_t subcategory;
168 };
169
170
171
172 #define LPFC_CRIT_TEMP 0x1
173 #define LPFC_THRESHOLD_TEMP 0x2
174 #define LPFC_NORMAL_TEMP 0x3
175
176 struct temp_event {
177 uint32_t event_type;
178 uint32_t event_code;
179 uint32_t data;
180 };
181