hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/s390/scsi/zfcp_dbf.h
....@@ -3,7 +3,7 @@
33 * zfcp device driver
44 * debug feature declarations
55 *
6
- * Copyright IBM Corp. 2008, 2017
6
+ * Copyright IBM Corp. 2008, 2020
77 */
88
99 #ifndef ZFCP_DBF_H
....@@ -16,6 +16,7 @@
1616
1717 #define ZFCP_DBF_TAG_LEN 7
1818
19
+#define ZFCP_DBF_INVALID_WWPN 0x0000000000000000ull
1920 #define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull
2021
2122 enum zfcp_dbf_pseudo_erp_act_type {
....@@ -42,7 +43,8 @@
4243 * @fsf_req_id: request id for fsf requests
4344 * @rec_status: status of the fsf request
4445 * @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
4648 */
4749 struct zfcp_dbf_rec_running {
4850 u64 fsf_req_id;
....@@ -72,6 +74,7 @@
7274 * @adapter_status: current status of the adapter
7375 * @port_status: current status of the port
7476 * @lun_status: current status of the lun
77
+ * @u: record type specific data
7578 * @u.trig: structure zfcp_dbf_rec_trigger
7679 * @u.run: structure zfcp_dbf_rec_running
7780 */
....@@ -126,6 +129,8 @@
126129 * @prot_status_qual: protocol status qualifier
127130 * @fsf_status: fsf status
128131 * @fsf_status_qual: fsf status qualifier
132
+ * @port_handle: handle for port
133
+ * @lun_handle: handle for LUN
129134 */
130135 struct zfcp_dbf_hba_res {
131136 u64 req_issued;
....@@ -154,16 +159,38 @@
154159 } __packed;
155160
156161 /**
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
+/**
157181 * enum zfcp_dbf_hba_id - HBA trace record identifier
158182 * @ZFCP_DBF_HBA_RES: response trace record
159183 * @ZFCP_DBF_HBA_USS: unsolicited status trace record
160184 * @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
161187 */
162188 enum zfcp_dbf_hba_id {
163189 ZFCP_DBF_HBA_RES = 1,
164190 ZFCP_DBF_HBA_USS = 2,
165191 ZFCP_DBF_HBA_BIT = 3,
166192 ZFCP_DBF_HBA_BASIC = 4,
193
+ ZFCP_DBF_HBA_FCES = 5,
167194 };
168195
169196 /**
....@@ -176,6 +203,10 @@
176203 * @fsf_seq_no: fsf sequence number
177204 * @pl_len: length of payload stored as zfcp_dbf_pay
178205 * @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
179210 */
180211 struct zfcp_dbf_hba {
181212 u8 id;
....@@ -189,6 +220,7 @@
189220 struct zfcp_dbf_hba_res res;
190221 struct zfcp_dbf_hba_uss uss;
191222 struct fsf_bit_error_payload be;
223
+ struct zfcp_dbf_hba_fces fces;
192224 } u;
193225 } __packed;
194226
....@@ -339,8 +371,8 @@
339371 zfcp_dbf_hba_fsf_resp_suppress(req)
340372 ? 5 : 1, req);
341373
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)) {
344376 zfcp_dbf_hba_fsf_resp("fs_open", 4, req);
345377
346378 } else if (qtcb->header.log_length) {