diff options
Diffstat (limited to 'drivers/s390/scsi/zfcp_def.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 213 |
1 files changed, 179 insertions, 34 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 9160e68c4a21..fc5bb6f31808 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -66,7 +66,7 @@ | |||
66 | /********************* GENERAL DEFINES *********************************/ | 66 | /********************* GENERAL DEFINES *********************************/ |
67 | 67 | ||
68 | /* zfcp version number, it consists of major, minor, and patch-level number */ | 68 | /* zfcp version number, it consists of major, minor, and patch-level number */ |
69 | #define ZFCP_VERSION "4.3.0" | 69 | #define ZFCP_VERSION "4.4.0" |
70 | 70 | ||
71 | /** | 71 | /** |
72 | * zfcp_sg_to_address - determine kernel address from struct scatterlist | 72 | * zfcp_sg_to_address - determine kernel address from struct scatterlist |
@@ -281,6 +281,171 @@ struct fcp_logo { | |||
281 | } __attribute__((packed)); | 281 | } __attribute__((packed)); |
282 | 282 | ||
283 | /* | 283 | /* |
284 | * DBF stuff | ||
285 | */ | ||
286 | #define ZFCP_DBF_TAG_SIZE 4 | ||
287 | |||
288 | struct zfcp_dbf_dump { | ||
289 | u8 tag[ZFCP_DBF_TAG_SIZE]; | ||
290 | u32 total_size; /* size of total dump data */ | ||
291 | u32 offset; /* how much data has being already dumped */ | ||
292 | u32 size; /* how much data comes with this record */ | ||
293 | u8 data[]; /* dump data */ | ||
294 | } __attribute__ ((packed)); | ||
295 | |||
296 | /* FIXME: to be inflated when reworking the erp dbf */ | ||
297 | struct zfcp_erp_dbf_record { | ||
298 | u8 dummy[16]; | ||
299 | } __attribute__ ((packed)); | ||
300 | |||
301 | struct zfcp_hba_dbf_record_response { | ||
302 | u32 fsf_command; | ||
303 | u64 fsf_reqid; | ||
304 | u32 fsf_seqno; | ||
305 | u64 fsf_issued; | ||
306 | u32 fsf_prot_status; | ||
307 | u32 fsf_status; | ||
308 | u8 fsf_prot_status_qual[FSF_PROT_STATUS_QUAL_SIZE]; | ||
309 | u8 fsf_status_qual[FSF_STATUS_QUALIFIER_SIZE]; | ||
310 | u32 fsf_req_status; | ||
311 | u8 sbal_first; | ||
312 | u8 sbal_curr; | ||
313 | u8 sbal_last; | ||
314 | u8 pool; | ||
315 | u64 erp_action; | ||
316 | union { | ||
317 | struct { | ||
318 | u64 scsi_cmnd; | ||
319 | u64 scsi_serial; | ||
320 | } send_fcp; | ||
321 | struct { | ||
322 | u64 wwpn; | ||
323 | u32 d_id; | ||
324 | u32 port_handle; | ||
325 | } port; | ||
326 | struct { | ||
327 | u64 wwpn; | ||
328 | u64 fcp_lun; | ||
329 | u32 port_handle; | ||
330 | u32 lun_handle; | ||
331 | } unit; | ||
332 | struct { | ||
333 | u32 d_id; | ||
334 | u8 ls_code; | ||
335 | } send_els; | ||
336 | } data; | ||
337 | } __attribute__ ((packed)); | ||
338 | |||
339 | struct zfcp_hba_dbf_record_status { | ||
340 | u8 failed; | ||
341 | u32 status_type; | ||
342 | u32 status_subtype; | ||
343 | struct fsf_queue_designator | ||
344 | queue_designator; | ||
345 | u32 payload_size; | ||
346 | #define ZFCP_DBF_UNSOL_PAYLOAD 80 | ||
347 | #define ZFCP_DBF_UNSOL_PAYLOAD_SENSE_DATA_AVAIL 32 | ||
348 | #define ZFCP_DBF_UNSOL_PAYLOAD_BIT_ERROR_THRESHOLD 56 | ||
349 | #define ZFCP_DBF_UNSOL_PAYLOAD_FEATURE_UPDATE_ALERT 2 * sizeof(u32) | ||
350 | u8 payload[ZFCP_DBF_UNSOL_PAYLOAD]; | ||
351 | } __attribute__ ((packed)); | ||
352 | |||
353 | struct zfcp_hba_dbf_record_qdio { | ||
354 | u32 status; | ||
355 | u32 qdio_error; | ||
356 | u32 siga_error; | ||
357 | u8 sbal_index; | ||
358 | u8 sbal_count; | ||
359 | } __attribute__ ((packed)); | ||
360 | |||
361 | struct zfcp_hba_dbf_record { | ||
362 | u8 tag[ZFCP_DBF_TAG_SIZE]; | ||
363 | u8 tag2[ZFCP_DBF_TAG_SIZE]; | ||
364 | union { | ||
365 | struct zfcp_hba_dbf_record_response response; | ||
366 | struct zfcp_hba_dbf_record_status status; | ||
367 | struct zfcp_hba_dbf_record_qdio qdio; | ||
368 | } type; | ||
369 | } __attribute__ ((packed)); | ||
370 | |||
371 | struct zfcp_san_dbf_record_ct { | ||
372 | union { | ||
373 | struct { | ||
374 | u16 cmd_req_code; | ||
375 | u8 revision; | ||
376 | u8 gs_type; | ||
377 | u8 gs_subtype; | ||
378 | u8 options; | ||
379 | u16 max_res_size; | ||
380 | } request; | ||
381 | struct { | ||
382 | u16 cmd_rsp_code; | ||
383 | u8 revision; | ||
384 | u8 reason_code; | ||
385 | u8 reason_code_expl; | ||
386 | u8 vendor_unique; | ||
387 | } response; | ||
388 | } type; | ||
389 | u32 payload_size; | ||
390 | #define ZFCP_DBF_CT_PAYLOAD 24 | ||
391 | u8 payload[ZFCP_DBF_CT_PAYLOAD]; | ||
392 | } __attribute__ ((packed)); | ||
393 | |||
394 | struct zfcp_san_dbf_record_els { | ||
395 | u8 ls_code; | ||
396 | u32 payload_size; | ||
397 | #define ZFCP_DBF_ELS_PAYLOAD 32 | ||
398 | #define ZFCP_DBF_ELS_MAX_PAYLOAD 1024 | ||
399 | u8 payload[ZFCP_DBF_ELS_PAYLOAD]; | ||
400 | } __attribute__ ((packed)); | ||
401 | |||
402 | struct zfcp_san_dbf_record { | ||
403 | u8 tag[ZFCP_DBF_TAG_SIZE]; | ||
404 | u64 fsf_reqid; | ||
405 | u32 fsf_seqno; | ||
406 | u32 s_id; | ||
407 | u32 d_id; | ||
408 | union { | ||
409 | struct zfcp_san_dbf_record_ct ct; | ||
410 | struct zfcp_san_dbf_record_els els; | ||
411 | } type; | ||
412 | } __attribute__ ((packed)); | ||
413 | |||
414 | struct zfcp_scsi_dbf_record { | ||
415 | u8 tag[ZFCP_DBF_TAG_SIZE]; | ||
416 | u8 tag2[ZFCP_DBF_TAG_SIZE]; | ||
417 | u32 scsi_id; | ||
418 | u32 scsi_lun; | ||
419 | u32 scsi_result; | ||
420 | u64 scsi_cmnd; | ||
421 | u64 scsi_serial; | ||
422 | #define ZFCP_DBF_SCSI_OPCODE 16 | ||
423 | u8 scsi_opcode[ZFCP_DBF_SCSI_OPCODE]; | ||
424 | u8 scsi_retries; | ||
425 | u8 scsi_allowed; | ||
426 | u64 fsf_reqid; | ||
427 | u32 fsf_seqno; | ||
428 | u64 fsf_issued; | ||
429 | union { | ||
430 | struct { | ||
431 | u64 fsf_reqid; | ||
432 | u32 fsf_seqno; | ||
433 | u64 fsf_issued; | ||
434 | } new_fsf_req; | ||
435 | struct { | ||
436 | u8 rsp_validity; | ||
437 | u8 rsp_scsi_status; | ||
438 | u32 rsp_resid; | ||
439 | u8 rsp_code; | ||
440 | #define ZFCP_DBF_SCSI_FCP_SNS_INFO 16 | ||
441 | #define ZFCP_DBF_SCSI_MAX_FCP_SNS_INFO 256 | ||
442 | u32 sns_info_len; | ||
443 | u8 sns_info[ZFCP_DBF_SCSI_FCP_SNS_INFO]; | ||
444 | } fcp; | ||
445 | } type; | ||
446 | } __attribute__ ((packed)); | ||
447 | |||
448 | /* | ||
284 | * FC-FS stuff | 449 | * FC-FS stuff |
285 | */ | 450 | */ |
286 | #define R_A_TOV 10 /* seconds */ | 451 | #define R_A_TOV 10 /* seconds */ |
@@ -339,34 +504,6 @@ struct zfcp_rc_entry { | |||
339 | */ | 504 | */ |
340 | #define ZFCP_CT_TIMEOUT (3 * R_A_TOV) | 505 | #define ZFCP_CT_TIMEOUT (3 * R_A_TOV) |
341 | 506 | ||
342 | |||
343 | /***************** S390 DEBUG FEATURE SPECIFIC DEFINES ***********************/ | ||
344 | |||
345 | /* debug feature entries per adapter */ | ||
346 | #define ZFCP_ERP_DBF_INDEX 1 | ||
347 | #define ZFCP_ERP_DBF_AREAS 2 | ||
348 | #define ZFCP_ERP_DBF_LENGTH 16 | ||
349 | #define ZFCP_ERP_DBF_LEVEL 3 | ||
350 | #define ZFCP_ERP_DBF_NAME "zfcperp" | ||
351 | |||
352 | #define ZFCP_CMD_DBF_INDEX 2 | ||
353 | #define ZFCP_CMD_DBF_AREAS 1 | ||
354 | #define ZFCP_CMD_DBF_LENGTH 8 | ||
355 | #define ZFCP_CMD_DBF_LEVEL 3 | ||
356 | #define ZFCP_CMD_DBF_NAME "zfcpcmd" | ||
357 | |||
358 | #define ZFCP_ABORT_DBF_INDEX 2 | ||
359 | #define ZFCP_ABORT_DBF_AREAS 1 | ||
360 | #define ZFCP_ABORT_DBF_LENGTH 8 | ||
361 | #define ZFCP_ABORT_DBF_LEVEL 6 | ||
362 | #define ZFCP_ABORT_DBF_NAME "zfcpabt" | ||
363 | |||
364 | #define ZFCP_IN_ELS_DBF_INDEX 2 | ||
365 | #define ZFCP_IN_ELS_DBF_AREAS 1 | ||
366 | #define ZFCP_IN_ELS_DBF_LENGTH 8 | ||
367 | #define ZFCP_IN_ELS_DBF_LEVEL 6 | ||
368 | #define ZFCP_IN_ELS_DBF_NAME "zfcpels" | ||
369 | |||
370 | /******************** LOGGING MACROS AND DEFINES *****************************/ | 507 | /******************** LOGGING MACROS AND DEFINES *****************************/ |
371 | 508 | ||
372 | /* | 509 | /* |
@@ -823,11 +960,18 @@ struct zfcp_adapter { | |||
823 | u32 erp_low_mem_count; /* nr of erp actions waiting | 960 | u32 erp_low_mem_count; /* nr of erp actions waiting |
824 | for memory */ | 961 | for memory */ |
825 | struct zfcp_port *nameserver_port; /* adapter's nameserver */ | 962 | struct zfcp_port *nameserver_port; /* adapter's nameserver */ |
826 | debug_info_t *erp_dbf; /* S/390 debug features */ | 963 | debug_info_t *erp_dbf; |
827 | debug_info_t *abort_dbf; | 964 | debug_info_t *hba_dbf; |
828 | debug_info_t *in_els_dbf; | 965 | debug_info_t *san_dbf; /* debug feature areas */ |
829 | debug_info_t *cmd_dbf; | 966 | debug_info_t *scsi_dbf; |
830 | spinlock_t dbf_lock; | 967 | spinlock_t erp_dbf_lock; |
968 | spinlock_t hba_dbf_lock; | ||
969 | spinlock_t san_dbf_lock; | ||
970 | spinlock_t scsi_dbf_lock; | ||
971 | struct zfcp_erp_dbf_record erp_dbf_buf; | ||
972 | struct zfcp_hba_dbf_record hba_dbf_buf; | ||
973 | struct zfcp_san_dbf_record san_dbf_buf; | ||
974 | struct zfcp_scsi_dbf_record scsi_dbf_buf; | ||
831 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ | 975 | struct zfcp_adapter_mempool pool; /* Adapter memory pools */ |
832 | struct qdio_initialize qdio_init_data; /* for qdio_establish */ | 976 | struct qdio_initialize qdio_init_data; /* for qdio_establish */ |
833 | struct device generic_services; /* directory for WKA ports */ | 977 | struct device generic_services; /* directory for WKA ports */ |
@@ -902,6 +1046,7 @@ struct zfcp_fsf_req { | |||
902 | issued on behalf of erp */ | 1046 | issued on behalf of erp */ |
903 | mempool_t *pool; /* used if request was alloacted | 1047 | mempool_t *pool; /* used if request was alloacted |
904 | from emergency pool */ | 1048 | from emergency pool */ |
1049 | unsigned long long issued; /* request sent time (STCK) */ | ||
905 | struct zfcp_unit *unit; | 1050 | struct zfcp_unit *unit; |
906 | }; | 1051 | }; |
907 | 1052 | ||