.. | .. |
---|
3 | 3 | * zfcp device driver |
---|
4 | 4 | * debug feature declarations |
---|
5 | 5 | * |
---|
6 | | - * Copyright IBM Corp. 2008, 2017 |
---|
| 6 | + * Copyright IBM Corp. 2008, 2020 |
---|
7 | 7 | */ |
---|
8 | 8 | |
---|
9 | 9 | #ifndef ZFCP_DBF_H |
---|
.. | .. |
---|
16 | 16 | |
---|
17 | 17 | #define ZFCP_DBF_TAG_LEN 7 |
---|
18 | 18 | |
---|
| 19 | +#define ZFCP_DBF_INVALID_WWPN 0x0000000000000000ull |
---|
19 | 20 | #define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull |
---|
20 | 21 | |
---|
21 | 22 | enum zfcp_dbf_pseudo_erp_act_type { |
---|
.. | .. |
---|
42 | 43 | * @fsf_req_id: request id for fsf requests |
---|
43 | 44 | * @rec_status: status of the fsf request |
---|
44 | 45 | * @rec_step: current step of the recovery action |
---|
45 | | - * rec_count: recovery counter |
---|
| 46 | + * @rec_action: ERP action type |
---|
| 47 | + * @rec_count: recoveries including retries for particular @rec_action |
---|
46 | 48 | */ |
---|
47 | 49 | struct zfcp_dbf_rec_running { |
---|
48 | 50 | u64 fsf_req_id; |
---|
.. | .. |
---|
72 | 74 | * @adapter_status: current status of the adapter |
---|
73 | 75 | * @port_status: current status of the port |
---|
74 | 76 | * @lun_status: current status of the lun |
---|
| 77 | + * @u: record type specific data |
---|
75 | 78 | * @u.trig: structure zfcp_dbf_rec_trigger |
---|
76 | 79 | * @u.run: structure zfcp_dbf_rec_running |
---|
77 | 80 | */ |
---|
.. | .. |
---|
126 | 129 | * @prot_status_qual: protocol status qualifier |
---|
127 | 130 | * @fsf_status: fsf status |
---|
128 | 131 | * @fsf_status_qual: fsf status qualifier |
---|
| 132 | + * @port_handle: handle for port |
---|
| 133 | + * @lun_handle: handle for LUN |
---|
129 | 134 | */ |
---|
130 | 135 | struct zfcp_dbf_hba_res { |
---|
131 | 136 | u64 req_issued; |
---|
.. | .. |
---|
154 | 159 | } __packed; |
---|
155 | 160 | |
---|
156 | 161 | /** |
---|
| 162 | + * struct zfcp_dbf_hba_fces - trace record for FC Endpoint Security |
---|
| 163 | + * @req_issued: timestamp when request was issued |
---|
| 164 | + * @fsf_status: fsf status |
---|
| 165 | + * @port_handle: handle for port |
---|
| 166 | + * @wwpn: remote FC port WWPN |
---|
| 167 | + * @fc_security_old: old FC Endpoint Security |
---|
| 168 | + * @fc_security_new: new FC Endpoint Security |
---|
| 169 | + * |
---|
| 170 | + */ |
---|
| 171 | +struct zfcp_dbf_hba_fces { |
---|
| 172 | + u64 req_issued; |
---|
| 173 | + u32 fsf_status; |
---|
| 174 | + u32 port_handle; |
---|
| 175 | + u64 wwpn; |
---|
| 176 | + u32 fc_security_old; |
---|
| 177 | + u32 fc_security_new; |
---|
| 178 | +} __packed; |
---|
| 179 | + |
---|
| 180 | +/** |
---|
157 | 181 | * enum zfcp_dbf_hba_id - HBA trace record identifier |
---|
158 | 182 | * @ZFCP_DBF_HBA_RES: response trace record |
---|
159 | 183 | * @ZFCP_DBF_HBA_USS: unsolicited status trace record |
---|
160 | 184 | * @ZFCP_DBF_HBA_BIT: bit error trace record |
---|
| 185 | + * @ZFCP_DBF_HBA_BASIC: basic adapter event, only trace tag, no other data |
---|
| 186 | + * @ZFCP_DBF_HBA_FCES: FC Endpoint Security trace record |
---|
161 | 187 | */ |
---|
162 | 188 | enum zfcp_dbf_hba_id { |
---|
163 | 189 | ZFCP_DBF_HBA_RES = 1, |
---|
164 | 190 | ZFCP_DBF_HBA_USS = 2, |
---|
165 | 191 | ZFCP_DBF_HBA_BIT = 3, |
---|
166 | 192 | ZFCP_DBF_HBA_BASIC = 4, |
---|
| 193 | + ZFCP_DBF_HBA_FCES = 5, |
---|
167 | 194 | }; |
---|
168 | 195 | |
---|
169 | 196 | /** |
---|
.. | .. |
---|
176 | 203 | * @fsf_seq_no: fsf sequence number |
---|
177 | 204 | * @pl_len: length of payload stored as zfcp_dbf_pay |
---|
178 | 205 | * @u: record type specific data |
---|
| 206 | + * @u.res: data for fsf responses |
---|
| 207 | + * @u.uss: data for unsolicited status buffer |
---|
| 208 | + * @u.be: data for bit error unsolicited status buffer |
---|
| 209 | + * @u.fces: data for FC Endpoint Security |
---|
179 | 210 | */ |
---|
180 | 211 | struct zfcp_dbf_hba { |
---|
181 | 212 | u8 id; |
---|
.. | .. |
---|
189 | 220 | struct zfcp_dbf_hba_res res; |
---|
190 | 221 | struct zfcp_dbf_hba_uss uss; |
---|
191 | 222 | struct fsf_bit_error_payload be; |
---|
| 223 | + struct zfcp_dbf_hba_fces fces; |
---|
192 | 224 | } u; |
---|
193 | 225 | } __packed; |
---|
194 | 226 | |
---|
.. | .. |
---|
339 | 371 | zfcp_dbf_hba_fsf_resp_suppress(req) |
---|
340 | 372 | ? 5 : 1, req); |
---|
341 | 373 | |
---|
342 | | - } else if ((req->fsf_command == FSF_QTCB_OPEN_PORT_WITH_DID) || |
---|
343 | | - (req->fsf_command == FSF_QTCB_OPEN_LUN)) { |
---|
| 374 | + } else if ((qtcb->header.fsf_command == FSF_QTCB_OPEN_PORT_WITH_DID) || |
---|
| 375 | + (qtcb->header.fsf_command == FSF_QTCB_OPEN_LUN)) { |
---|
344 | 376 | zfcp_dbf_hba_fsf_resp("fs_open", 4, req); |
---|
345 | 377 | |
---|
346 | 378 | } else if (qtcb->header.log_length) { |
---|