aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/scsi/zfcp_dbf.c35
-rw-r--r--drivers/s390/scsi/zfcp_def.h9
-rw-r--r--drivers/s390/scsi/zfcp_erp.c6
-rw-r--r--drivers/s390/scsi/zfcp_ext.h1
4 files changed, 51 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.c b/drivers/s390/scsi/zfcp_dbf.c
index f207b0bd0cad..466a689c538f 100644
--- a/drivers/s390/scsi/zfcp_dbf.c
+++ b/drivers/s390/scsi/zfcp_dbf.c
@@ -524,6 +524,7 @@ static const char *zfcp_rec_dbf_tags[] = {
524 [ZFCP_REC_DBF_ID_THREAD] = "thread", 524 [ZFCP_REC_DBF_ID_THREAD] = "thread",
525 [ZFCP_REC_DBF_ID_TARGET] = "target", 525 [ZFCP_REC_DBF_ID_TARGET] = "target",
526 [ZFCP_REC_DBF_ID_TRIGGER] = "trigger", 526 [ZFCP_REC_DBF_ID_TRIGGER] = "trigger",
527 [ZFCP_REC_DBF_ID_ACTION] = "action",
527}; 528};
528 529
529static const char *zfcp_rec_dbf_ids[] = { 530static const char *zfcp_rec_dbf_ids[] = {
@@ -671,6 +672,11 @@ static const char *zfcp_rec_dbf_ids[] = {
671 [139] = "hbaapi unit shutdown", 672 [139] = "hbaapi unit shutdown",
672 [140] = "qdio error", 673 [140] = "qdio error",
673 [141] = "scsi host reset", 674 [141] = "scsi host reset",
675 [142] = "dismissing fsf request for recovery action",
676 [143] = "recovery action timed out",
677 [144] = "recovery action gone",
678 [145] = "recovery action being processed",
679 [146] = "recovery action ready for next step",
674}; 680};
675 681
676static int zfcp_rec_dbf_view_format(debug_info_t *id, struct debug_view *view, 682static int zfcp_rec_dbf_view_format(debug_info_t *id, struct debug_view *view,
@@ -708,6 +714,12 @@ static int zfcp_rec_dbf_view_format(debug_info_t *id, struct debug_view *view,
708 zfcp_dbf_out(&p, "port_status", "0x%08x", r->u.trigger.ps); 714 zfcp_dbf_out(&p, "port_status", "0x%08x", r->u.trigger.ps);
709 zfcp_dbf_out(&p, "unit_status", "0x%08x", r->u.trigger.us); 715 zfcp_dbf_out(&p, "unit_status", "0x%08x", r->u.trigger.us);
710 break; 716 break;
717 case ZFCP_REC_DBF_ID_ACTION:
718 zfcp_dbf_out(&p, "erp_action", "0x%016Lx", r->u.action.action);
719 zfcp_dbf_out(&p, "fsf_req", "0x%016Lx", r->u.action.fsf_req);
720 zfcp_dbf_out(&p, "status", "0x%08Lx", r->u.action.status);
721 zfcp_dbf_out(&p, "step", "0x%08Lx", r->u.action.step);
722 break;
711 } 723 }
712 sprintf(p, "\n"); 724 sprintf(p, "\n");
713 return (p - buf) + 1; 725 return (p - buf) + 1;
@@ -861,6 +873,29 @@ void zfcp_rec_dbf_event_trigger(u8 id2, u64 ref, u8 want, u8 need, u64 action,
861 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags); 873 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
862} 874}
863 875
876/**
877 * zfcp_rec_dbf_event_action - trace event showing progress of recovery action
878 * @id2: identifier
879 * @erp_action: error recovery action struct pointer
880 */
881void zfcp_rec_dbf_event_action(u8 id2, struct zfcp_erp_action *erp_action)
882{
883 struct zfcp_adapter *adapter = erp_action->adapter;
884 struct zfcp_rec_dbf_record *r = &adapter->rec_dbf_buf;
885 unsigned long flags;
886
887 spin_lock_irqsave(&adapter->rec_dbf_lock, flags);
888 memset(r, 0, sizeof(*r));
889 r->id = ZFCP_REC_DBF_ID_ACTION;
890 r->id2 = id2;
891 r->u.action.action = (u64)erp_action;
892 r->u.action.status = erp_action->status;
893 r->u.action.step = erp_action->step;
894 r->u.action.fsf_req = (u64)erp_action->fsf_req;
895 debug_event(adapter->rec_dbf, 4, r, sizeof(*r));
896 spin_unlock_irqrestore(&adapter->rec_dbf_lock, flags);
897}
898
864static void 899static void
865_zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req, 900_zfcp_san_dbf_event_common_ct(const char *tag, struct zfcp_fsf_req *fsf_req,
866 u32 s_id, u32 d_id, void *buffer, int buflen) 901 u32 s_id, u32 d_id, void *buffer, int buflen)
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h
index aad75cfa1c60..9a4d870a820a 100644
--- a/drivers/s390/scsi/zfcp_def.h
+++ b/drivers/s390/scsi/zfcp_def.h
@@ -307,10 +307,18 @@ struct zfcp_rec_dbf_record_trigger {
307 u64 fcp_lun; 307 u64 fcp_lun;
308} __attribute__ ((packed)); 308} __attribute__ ((packed));
309 309
310struct zfcp_rec_dbf_record_action {
311 u32 status;
312 u32 step;
313 u64 action;
314 u64 fsf_req;
315} __attribute__ ((packed));
316
310struct zfcp_rec_dbf_record { 317struct zfcp_rec_dbf_record {
311 u8 id; 318 u8 id;
312 u8 id2; 319 u8 id2;
313 union { 320 union {
321 struct zfcp_rec_dbf_record_action action;
314 struct zfcp_rec_dbf_record_thread thread; 322 struct zfcp_rec_dbf_record_thread thread;
315 struct zfcp_rec_dbf_record_target target; 323 struct zfcp_rec_dbf_record_target target;
316 struct zfcp_rec_dbf_record_trigger trigger; 324 struct zfcp_rec_dbf_record_trigger trigger;
@@ -318,6 +326,7 @@ struct zfcp_rec_dbf_record {
318} __attribute__ ((packed)); 326} __attribute__ ((packed));
319 327
320enum { 328enum {
329 ZFCP_REC_DBF_ID_ACTION,
321 ZFCP_REC_DBF_ID_THREAD, 330 ZFCP_REC_DBF_ID_THREAD,
322 ZFCP_REC_DBF_ID_TARGET, 331 ZFCP_REC_DBF_ID_TARGET,
323 ZFCP_REC_DBF_ID_TRIGGER, 332 ZFCP_REC_DBF_ID_TRIGGER,
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 55e034b10ded..335ab70181e8 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -893,8 +893,10 @@ zfcp_erp_strategy_check_fsfreq(struct zfcp_erp_action *erp_action)
893 "a_ca_disreq"); 893 "a_ca_disreq");
894 erp_action->fsf_req->status |= 894 erp_action->fsf_req->status |=
895 ZFCP_STATUS_FSFREQ_DISMISSED; 895 ZFCP_STATUS_FSFREQ_DISMISSED;
896 zfcp_rec_dbf_event_action(142, erp_action);
896 } 897 }
897 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) { 898 if (erp_action->status & ZFCP_STATUS_ERP_TIMEDOUT) {
899 zfcp_rec_dbf_event_action(143, erp_action);
898 ZFCP_LOG_NORMAL("error: erp step timed out " 900 ZFCP_LOG_NORMAL("error: erp step timed out "
899 "(action=%d, fsf_req=%p)\n ", 901 "(action=%d, fsf_req=%p)\n ",
900 erp_action->action, 902 erp_action->action,
@@ -3162,6 +3164,8 @@ zfcp_erp_action_dequeue(struct zfcp_erp_action *erp_action)
3162 debug_text_event(adapter->erp_dbf, 4, "a_actdeq"); 3164 debug_text_event(adapter->erp_dbf, 4, "a_actdeq");
3163 debug_event(adapter->erp_dbf, 4, &erp_action->action, sizeof (int)); 3165 debug_event(adapter->erp_dbf, 4, &erp_action->action, sizeof (int));
3164 list_del(&erp_action->list); 3166 list_del(&erp_action->list);
3167 zfcp_rec_dbf_event_action(144, erp_action);
3168
3165 switch (erp_action->action) { 3169 switch (erp_action->action) {
3166 case ZFCP_ERP_ACTION_REOPEN_UNIT: 3170 case ZFCP_ERP_ACTION_REOPEN_UNIT:
3167 atomic_clear_mask(ZFCP_STATUS_COMMON_ERP_INUSE, 3171 atomic_clear_mask(ZFCP_STATUS_COMMON_ERP_INUSE,
@@ -3305,6 +3309,7 @@ static void zfcp_erp_action_to_running(struct zfcp_erp_action *erp_action)
3305 debug_text_event(adapter->erp_dbf, 6, "a_toru"); 3309 debug_text_event(adapter->erp_dbf, 6, "a_toru");
3306 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int)); 3310 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int));
3307 list_move(&erp_action->list, &erp_action->adapter->erp_running_head); 3311 list_move(&erp_action->list, &erp_action->adapter->erp_running_head);
3312 zfcp_rec_dbf_event_action(145, erp_action);
3308} 3313}
3309 3314
3310static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action) 3315static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action)
@@ -3314,6 +3319,7 @@ static void zfcp_erp_action_to_ready(struct zfcp_erp_action *erp_action)
3314 debug_text_event(adapter->erp_dbf, 6, "a_tore"); 3319 debug_text_event(adapter->erp_dbf, 6, "a_tore");
3315 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int)); 3320 debug_event(adapter->erp_dbf, 6, &erp_action->action, sizeof (int));
3316 list_move(&erp_action->list, &erp_action->adapter->erp_ready_head); 3321 list_move(&erp_action->list, &erp_action->adapter->erp_ready_head);
3322 zfcp_rec_dbf_event_action(146, erp_action);
3317} 3323}
3318 3324
3319void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref) 3325void zfcp_erp_port_boxed(struct zfcp_port *port, u8 id, u64 ref)
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h
index e10ed145baa7..6de0147d84d8 100644
--- a/drivers/s390/scsi/zfcp_ext.h
+++ b/drivers/s390/scsi/zfcp_ext.h
@@ -173,6 +173,7 @@ extern void zfcp_rec_dbf_event_unit(u8 id, u64 ref, struct zfcp_unit *unit);
173extern void zfcp_rec_dbf_event_trigger(u8 id, u64 ref, u8 want, u8 need, 173extern void zfcp_rec_dbf_event_trigger(u8 id, u64 ref, u8 want, u8 need,
174 u64 action, struct zfcp_adapter *, 174 u64 action, struct zfcp_adapter *,
175 struct zfcp_port *, struct zfcp_unit *); 175 struct zfcp_port *, struct zfcp_unit *);
176extern void zfcp_rec_dbf_event_action(u8 id, struct zfcp_erp_action *);
176 177
177extern void zfcp_hba_dbf_event_fsf_response(struct zfcp_fsf_req *); 178extern void zfcp_hba_dbf_event_fsf_response(struct zfcp_fsf_req *);
178extern void zfcp_hba_dbf_event_fsf_unsol(const char *, struct zfcp_adapter *, 179extern void zfcp_hba_dbf_event_fsf_unsol(const char *, struct zfcp_adapter *,