diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 1 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_dbf.c | 42 | ||||
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 10 |
3 files changed, 53 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 874b55ed00a3..f3eff7ebcb6b 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c | |||
@@ -1034,6 +1034,7 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device) | |||
1034 | spin_lock_init(&adapter->hba_dbf_lock); | 1034 | spin_lock_init(&adapter->hba_dbf_lock); |
1035 | spin_lock_init(&adapter->san_dbf_lock); | 1035 | spin_lock_init(&adapter->san_dbf_lock); |
1036 | spin_lock_init(&adapter->scsi_dbf_lock); | 1036 | spin_lock_init(&adapter->scsi_dbf_lock); |
1037 | spin_lock_init(&adapter->rec_dbf_lock); | ||
1037 | 1038 | ||
1038 | retval = zfcp_adapter_debug_register(adapter); | 1039 | retval = zfcp_adapter_debug_register(adapter); |
1039 | if (retval) | 1040 | if (retval) |
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c index 453343783990..e7712eb13eea 100644 --- a/drivers/s390/scsi/zfcp_dbf.c +++ b/drivers/s390/scsi/zfcp_dbf.c | |||
@@ -520,6 +520,36 @@ static struct debug_view zfcp_hba_dbf_view = { | |||
520 | NULL | 520 | NULL |
521 | }; | 521 | }; |
522 | 522 | ||
523 | static const char *zfcp_rec_dbf_tags[] = { | ||
524 | }; | ||
525 | |||
526 | static const char *zfcp_rec_dbf_ids[] = { | ||
527 | }; | ||
528 | |||
529 | static int zfcp_rec_dbf_view_format(debug_info_t *id, struct debug_view *view, | ||
530 | char *buf, const char *_rec) | ||
531 | { | ||
532 | struct zfcp_rec_dbf_record *r = (struct zfcp_rec_dbf_record *)_rec; | ||
533 | char *p = buf; | ||
534 | |||
535 | zfcp_dbf_outs(&p, "tag", zfcp_rec_dbf_tags[r->id]); | ||
536 | zfcp_dbf_outs(&p, "hint", zfcp_rec_dbf_ids[r->id2]); | ||
537 | zfcp_dbf_out(&p, "id", "%d", r->id2); | ||
538 | switch (r->id) { | ||
539 | } | ||
540 | sprintf(p, "\n"); | ||
541 | return (p - buf) + 1; | ||
542 | } | ||
543 | |||
544 | static struct debug_view zfcp_rec_dbf_view = { | ||
545 | "structured", | ||
546 | NULL, | ||
547 | &zfcp_dbf_view_header, | ||
548 | &zfcp_rec_dbf_view_format, | ||
549 | NULL, | ||
550 | NULL | ||
551 | }; | ||
552 | |||
523 | static void | 553 | static void |
524 | _zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, | 554 | _zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, |
525 | u32 s_id, u32 d_id, void *buffer, int buflen) | 555 | u32 s_id, u32 d_id, void *buffer, int buflen) |
@@ -934,6 +964,16 @@ int zfcp_adapter_debug_register(struct zfcp_adapter *adapter) | |||
934 | debug_register_view(adapter->erp_dbf, &debug_hex_ascii_view); | 964 | debug_register_view(adapter->erp_dbf, &debug_hex_ascii_view); |
935 | debug_set_level(adapter->erp_dbf, 3); | 965 | debug_set_level(adapter->erp_dbf, 3); |
936 | 966 | ||
967 | /* debug feature area which records recovery activity */ | ||
968 | sprintf(dbf_name, "zfcp_%s_rec", zfcp_get_busid_by_adapter(adapter)); | ||
969 | adapter->rec_dbf = debug_register(dbf_name, dbfsize, 1, | ||
970 | sizeof(struct zfcp_rec_dbf_record)); | ||
971 | if (!adapter->rec_dbf) | ||
972 | goto failed; | ||
973 | debug_register_view(adapter->rec_dbf, &debug_hex_ascii_view); | ||
974 | debug_register_view(adapter->rec_dbf, &zfcp_rec_dbf_view); | ||
975 | debug_set_level(adapter->rec_dbf, 3); | ||
976 | |||
937 | /* debug feature area which records HBA (FSF and QDIO) conditions */ | 977 | /* debug feature area which records HBA (FSF and QDIO) conditions */ |
938 | sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter)); | 978 | sprintf(dbf_name, "zfcp_%s_hba", zfcp_get_busid_by_adapter(adapter)); |
939 | adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1, | 979 | adapter->hba_dbf = debug_register(dbf_name, dbfsize, 1, |
@@ -981,10 +1021,12 @@ void zfcp_adapter_debug_unregister(struct zfcp_adapter *adapter) | |||
981 | debug_unregister(adapter->scsi_dbf); | 1021 | debug_unregister(adapter->scsi_dbf); |
982 | debug_unregister(adapter->san_dbf); | 1022 | debug_unregister(adapter->san_dbf); |
983 | debug_unregister(adapter->hba_dbf); | 1023 | debug_unregister(adapter->hba_dbf); |
1024 | debug_unregister(adapter->rec_dbf); | ||
984 | debug_unregister(adapter->erp_dbf); | 1025 | debug_unregister(adapter->erp_dbf); |
985 | adapter->scsi_dbf = NULL; | 1026 | adapter->scsi_dbf = NULL; |
986 | adapter->san_dbf = NULL; | 1027 | adapter->san_dbf = NULL; |
987 | adapter->hba_dbf = NULL; | 1028 | adapter->hba_dbf = NULL; |
1029 | adapter->rec_dbf = NULL; | ||
988 | adapter->erp_dbf = NULL; | 1030 | adapter->erp_dbf = NULL; |
989 | } | 1031 | } |
990 | 1032 | ||
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index 662c70f537ec..f29bee528489 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -279,6 +279,13 @@ struct zfcp_erp_dbf_record { | |||
279 | u8 dummy[16]; | 279 | u8 dummy[16]; |
280 | } __attribute__ ((packed)); | 280 | } __attribute__ ((packed)); |
281 | 281 | ||
282 | struct zfcp_rec_dbf_record { | ||
283 | u8 id; | ||
284 | u8 id2; | ||
285 | union { | ||
286 | } u; | ||
287 | } __attribute__ ((packed)); | ||
288 | |||
282 | struct zfcp_hba_dbf_record_response { | 289 | struct zfcp_hba_dbf_record_response { |
283 | u32 fsf_command; | 290 | u32 fsf_command; |
284 | u64 fsf_reqid; | 291 | u64 fsf_reqid; |
@@ -917,14 +924,17 @@ struct zfcp_adapter { | |||
917 | for memory */ | 924 | for memory */ |
918 | struct zfcp_port *nameserver_port; /* adapter's nameserver */ | 925 | struct zfcp_port *nameserver_port; /* adapter's nameserver */ |
919 | debug_info_t *erp_dbf; | 926 | debug_info_t *erp_dbf; |
927 | debug_info_t *rec_dbf; | ||
920 | debug_info_t *hba_dbf; | 928 | debug_info_t *hba_dbf; |
921 | debug_info_t *san_dbf; /* debug feature areas */ | 929 | debug_info_t *san_dbf; /* debug feature areas */ |
922 | debug_info_t *scsi_dbf; | 930 | debug_info_t *scsi_dbf; |
923 | spinlock_t erp_dbf_lock; | 931 | spinlock_t erp_dbf_lock; |
932 | spinlock_t rec_dbf_lock; | ||
924 | spinlock_t hba_dbf_lock; | 933 | spinlock_t hba_dbf_lock; |
925 | spinlock_t san_dbf_lock; | 934 | spinlock_t san_dbf_lock; |
926 | spinlock_t scsi_dbf_lock; | 935 | spinlock_t scsi_dbf_lock; |
927 | struct zfcp_erp_dbf_record erp_dbf_buf; | 936 | struct zfcp_erp_dbf_record erp_dbf_buf; |
937 | struct zfcp_rec_dbf_record rec_dbf_buf; | ||
928 | struct zfcp_hba_dbf_record hba_dbf_buf; | 938 | struct zfcp_hba_dbf_record hba_dbf_buf; |
929 | struct zfcp_san_dbf_record san_dbf_buf; | 939 | struct zfcp_san_dbf_record san_dbf_buf; |
930 | struct zfcp_scsi_dbf_record scsi_dbf_buf; | 940 | struct zfcp_scsi_dbf_record scsi_dbf_buf; |