aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_dbf.h
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2010-12-02 09:16:12 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-12-21 13:24:44 -0500
commitae0904f60fab7cb20c48d32eefdd735e478b91fb (patch)
treee856784159e1f79696a1fbaad7b680540511a992 /drivers/s390/scsi/zfcp_dbf.h
parent6b57b159709dcb4d53e64738f2d1f73b36e41601 (diff)
[SCSI] zfcp: Redesign of the debug tracing for recovery actions.
The tracing environment of the zfcp LLD has become very bulky and hard to maintain. Small changes involve a large modification process which is error-prone and not effective. This patch is the first of a set to redesign the zfcp tracing to a more straight-forward and easy to extend scheme. It removes all interpretation and visualization parts and focuses on bare logging of the information. This patch deals with all trace records of the zfcp error recovery. Signed-off-by: Swen schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/s390/scsi/zfcp_dbf.h')
-rw-r--r--drivers/s390/scsi/zfcp_dbf.h100
1 files changed, 58 insertions, 42 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h
index 04081b1b62b4..2e823d4ede6e 100644
--- a/drivers/s390/scsi/zfcp_dbf.h
+++ b/drivers/s390/scsi/zfcp_dbf.h
@@ -27,6 +27,7 @@
27#include "zfcp_fsf.h" 27#include "zfcp_fsf.h"
28#include "zfcp_def.h" 28#include "zfcp_def.h"
29 29
30#define ZFCP_DBF_TAG_LEN 7
30#define ZFCP_DBF_TAG_SIZE 4 31#define ZFCP_DBF_TAG_SIZE 4
31#define ZFCP_DBF_ID_SIZE 7 32#define ZFCP_DBF_ID_SIZE 7
32 33
@@ -40,57 +41,72 @@ struct zfcp_dbf_dump {
40 u8 data[]; /* dump data */ 41 u8 data[]; /* dump data */
41} __attribute__ ((packed)); 42} __attribute__ ((packed));
42 43
43struct zfcp_dbf_rec_record_thread { 44/**
44 u32 total; 45 * struct zfcp_dbf_rec_trigger - trace record for triggered recovery action
46 * @ready: number of ready recovery actions
47 * @running: number of running recovery actions
48 * @want: wanted recovery action
49 * @need: needed recovery action
50 */
51struct zfcp_dbf_rec_trigger {
45 u32 ready; 52 u32 ready;
46 u32 running; 53 u32 running;
47};
48
49struct zfcp_dbf_rec_record_target {
50 u64 ref;
51 u32 status;
52 u32 d_id;
53 u64 wwpn;
54 u64 fcp_lun;
55 u32 erp_count;
56};
57
58struct zfcp_dbf_rec_record_trigger {
59 u8 want; 54 u8 want;
60 u8 need; 55 u8 need;
61 u32 as; 56} __packed;
62 u32 ps; 57
63 u32 ls; 58/**
64 u64 ref; 59 * struct zfcp_dbf_rec_running - trace record for running recovery
65 u64 action; 60 * @fsf_req_id: request id for fsf requests
66 u64 wwpn; 61 * @rec_status: status of the fsf request
67 u64 fcp_lun; 62 * @rec_step: current step of the recovery action
68}; 63 * rec_count: recovery counter
64 */
65struct zfcp_dbf_rec_running {
66 u64 fsf_req_id;
67 u32 rec_status;
68 u16 rec_step;
69 u8 rec_action;
70 u8 rec_count;
71} __packed;
69 72
70struct zfcp_dbf_rec_record_action { 73/**
71 u32 status; 74 * enum zfcp_dbf_rec_id - recovery trace record id
72 u32 step; 75 * @ZFCP_DBF_REC_TRIG: triggered recovery identifier
73 u64 action; 76 * @ZFCP_DBF_REC_RUN: running recovery identifier
74 u64 fsf_req; 77 */
78enum zfcp_dbf_rec_id {
79 ZFCP_DBF_REC_TRIG = 1,
80 ZFCP_DBF_REC_RUN = 2,
75}; 81};
76 82
77struct zfcp_dbf_rec_record { 83/**
84 * struct zfcp_dbf_rec - trace record for error recovery actions
85 * @id: unique number of recovery record type
86 * @tag: identifier string specifying the location of initiation
87 * @lun: logical unit number
88 * @wwpn: word wide port number
89 * @d_id: destination ID
90 * @adapter_status: current status of the adapter
91 * @port_status: current status of the port
92 * @lun_status: current status of the lun
93 * @u.trig: structure zfcp_dbf_rec_trigger
94 * @u.run: structure zfcp_dbf_rec_running
95 */
96struct zfcp_dbf_rec {
78 u8 id; 97 u8 id;
79 char id2[7]; 98 char tag[ZFCP_DBF_TAG_LEN];
99 u64 lun;
100 u64 wwpn;
101 u32 d_id;
102 u32 adapter_status;
103 u32 port_status;
104 u32 lun_status;
80 union { 105 union {
81 struct zfcp_dbf_rec_record_action action; 106 struct zfcp_dbf_rec_trigger trig;
82 struct zfcp_dbf_rec_record_thread thread; 107 struct zfcp_dbf_rec_running run;
83 struct zfcp_dbf_rec_record_target target;
84 struct zfcp_dbf_rec_record_trigger trigger;
85 } u; 108 } u;
86}; 109} __packed;
87
88enum {
89 ZFCP_REC_DBF_ID_ACTION,
90 ZFCP_REC_DBF_ID_THREAD,
91 ZFCP_REC_DBF_ID_TARGET,
92 ZFCP_REC_DBF_ID_TRIGGER,
93};
94 110
95struct zfcp_dbf_hba_record_response { 111struct zfcp_dbf_hba_record_response {
96 u32 fsf_command; 112 u32 fsf_command;
@@ -232,7 +248,7 @@ struct zfcp_dbf {
232 spinlock_t hba_lock; 248 spinlock_t hba_lock;
233 spinlock_t san_lock; 249 spinlock_t san_lock;
234 spinlock_t scsi_lock; 250 spinlock_t scsi_lock;
235 struct zfcp_dbf_rec_record rec_buf; 251 struct zfcp_dbf_rec rec_buf;
236 struct zfcp_dbf_hba_record hba_buf; 252 struct zfcp_dbf_hba_record hba_buf;
237 struct zfcp_dbf_san_record san_buf; 253 struct zfcp_dbf_san_record san_buf;
238 struct zfcp_dbf_scsi_record scsi_buf; 254 struct zfcp_dbf_scsi_record scsi_buf;