diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_dbf.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.h | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index 8b7fd9a1033e..457e046f2d28 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #define ZFCP_DBF_TAG_SIZE 4 | 30 | #define ZFCP_DBF_TAG_SIZE 4 |
31 | #define ZFCP_DBF_ID_SIZE 7 | 31 | #define ZFCP_DBF_ID_SIZE 7 |
32 | 32 | ||
33 | #define ZFCP_DBF_INVALID_LUN 0xFFFFFFFFFFFFFFFFull | ||
34 | |||
33 | struct zfcp_dbf_dump { | 35 | struct zfcp_dbf_dump { |
34 | u8 tag[ZFCP_DBF_TAG_SIZE]; | 36 | u8 tag[ZFCP_DBF_TAG_SIZE]; |
35 | u32 total_size; /* size of total dump data */ | 37 | u32 total_size; /* size of total dump data */ |
@@ -192,10 +194,10 @@ struct zfcp_dbf_san_record { | |||
192 | struct zfcp_dbf_san_record_ct_response ct_resp; | 194 | struct zfcp_dbf_san_record_ct_response ct_resp; |
193 | struct zfcp_dbf_san_record_els els; | 195 | struct zfcp_dbf_san_record_els els; |
194 | } u; | 196 | } u; |
195 | #define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 | ||
196 | u8 payload[32]; | ||
197 | } __attribute__ ((packed)); | 197 | } __attribute__ ((packed)); |
198 | 198 | ||
199 | #define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 | ||
200 | |||
199 | struct zfcp_dbf_scsi_record { | 201 | struct zfcp_dbf_scsi_record { |
200 | u8 tag[ZFCP_DBF_TAG_SIZE]; | 202 | u8 tag[ZFCP_DBF_TAG_SIZE]; |
201 | u8 tag2[ZFCP_DBF_TAG_SIZE]; | 203 | u8 tag2[ZFCP_DBF_TAG_SIZE]; |
@@ -301,17 +303,31 @@ void zfcp_dbf_scsi(const char *tag, const char *tag2, int level, | |||
301 | 303 | ||
302 | /** | 304 | /** |
303 | * zfcp_dbf_scsi_result - trace event for SCSI command completion | 305 | * zfcp_dbf_scsi_result - trace event for SCSI command completion |
304 | * @tag: tag indicating success or failure of SCSI command | 306 | * @dbf: adapter dbf trace |
305 | * @level: trace level applicable for this event | 307 | * @scmd: SCSI command pointer |
306 | * @adapter: adapter that has been used to issue the SCSI command | 308 | * @req: FSF request used to issue SCSI command |
309 | */ | ||
310 | static inline | ||
311 | void zfcp_dbf_scsi_result(struct zfcp_dbf *dbf, struct scsi_cmnd *scmd, | ||
312 | struct zfcp_fsf_req *req) | ||
313 | { | ||
314 | if (scmd->result != 0) | ||
315 | zfcp_dbf_scsi("rslt", "erro", 3, dbf, scmd, req, 0); | ||
316 | else if (scmd->retries > 0) | ||
317 | zfcp_dbf_scsi("rslt", "retr", 4, dbf, scmd, req, 0); | ||
318 | else | ||
319 | zfcp_dbf_scsi("rslt", "norm", 6, dbf, scmd, req, 0); | ||
320 | } | ||
321 | |||
322 | /** | ||
323 | * zfcp_dbf_scsi_fail_send - trace event for failure to send SCSI command | ||
324 | * @dbf: adapter dbf trace | ||
307 | * @scmd: SCSI command pointer | 325 | * @scmd: SCSI command pointer |
308 | * @fsf_req: request used to issue SCSI command (might be NULL) | ||
309 | */ | 326 | */ |
310 | static inline | 327 | static inline |
311 | void zfcp_dbf_scsi_result(const char *tag, int level, struct zfcp_dbf *dbf, | 328 | void zfcp_dbf_scsi_fail_send(struct zfcp_dbf *dbf, struct scsi_cmnd *scmd) |
312 | struct scsi_cmnd *scmd, struct zfcp_fsf_req *fsf_req) | ||
313 | { | 329 | { |
314 | zfcp_dbf_scsi("rslt", tag, level, dbf, scmd, fsf_req, 0); | 330 | zfcp_dbf_scsi("rslt", "fail", 4, dbf, scmd, NULL, 0); |
315 | } | 331 | } |
316 | 332 | ||
317 | /** | 333 | /** |