diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2010-12-02 09:16:13 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 13:24:45 -0500 |
commit | 2c55b750a884b86dea8b4cc5f15e1484cc47a25c (patch) | |
tree | 0f7e53365fc93504c6a23a14d0faae16998861e8 /drivers/s390/scsi/zfcp_dbf.h | |
parent | ae0904f60fab7cb20c48d32eefdd735e478b91fb (diff) |
[SCSI] zfcp: Redesign of the debug tracing for SAN records.
This patch is the continuation to redesign the zfcp tracing to a more
straight-forward and easy to extend scheme.
This patch deals with all trace records of the zfcp SAN area.
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.h | 68 |
1 files changed, 29 insertions, 39 deletions
diff --git a/drivers/s390/scsi/zfcp_dbf.h b/drivers/s390/scsi/zfcp_dbf.h index 2e823d4ede6e..a3af6bd3d5aa 100644 --- a/drivers/s390/scsi/zfcp_dbf.h +++ b/drivers/s390/scsi/zfcp_dbf.h | |||
@@ -108,6 +108,34 @@ struct zfcp_dbf_rec { | |||
108 | } u; | 108 | } u; |
109 | } __packed; | 109 | } __packed; |
110 | 110 | ||
111 | /** | ||
112 | * enum zfcp_dbf_san_id - SAN trace record identifier | ||
113 | * @ZFCP_DBF_SAN_REQ: request trace record id | ||
114 | * @ZFCP_DBF_SAN_RES: response trace record id | ||
115 | * @ZFCP_DBF_SAN_ELS: extended link service record id | ||
116 | */ | ||
117 | enum zfcp_dbf_san_id { | ||
118 | ZFCP_DBF_SAN_REQ = 1, | ||
119 | ZFCP_DBF_SAN_RES = 2, | ||
120 | ZFCP_DBF_SAN_ELS = 3, | ||
121 | }; | ||
122 | |||
123 | /** struct zfcp_dbf_san - trace record for SAN requests and responses | ||
124 | * @id: unique number of recovery record type | ||
125 | * @tag: identifier string specifying the location of initiation | ||
126 | * @fsf_req_id: request id for fsf requests | ||
127 | * @payload: unformatted information related to request/response | ||
128 | * @d_id: destination id | ||
129 | */ | ||
130 | struct zfcp_dbf_san { | ||
131 | u8 id; | ||
132 | char tag[ZFCP_DBF_TAG_LEN]; | ||
133 | u64 fsf_req_id; | ||
134 | u32 d_id; | ||
135 | #define ZFCP_DBF_SAN_MAX_PAYLOAD (FC_CT_HDR_LEN + 32) | ||
136 | char payload[ZFCP_DBF_SAN_MAX_PAYLOAD]; | ||
137 | } __packed; | ||
138 | |||
111 | struct zfcp_dbf_hba_record_response { | 139 | struct zfcp_dbf_hba_record_response { |
112 | u32 fsf_command; | 140 | u32 fsf_command; |
113 | u64 fsf_reqid; | 141 | u64 fsf_reqid; |
@@ -176,44 +204,6 @@ struct zfcp_dbf_hba_record { | |||
176 | } u; | 204 | } u; |
177 | } __attribute__ ((packed)); | 205 | } __attribute__ ((packed)); |
178 | 206 | ||
179 | struct zfcp_dbf_san_record_ct_request { | ||
180 | u16 cmd_req_code; | ||
181 | u8 revision; | ||
182 | u8 gs_type; | ||
183 | u8 gs_subtype; | ||
184 | u8 options; | ||
185 | u16 max_res_size; | ||
186 | u32 len; | ||
187 | u32 d_id; | ||
188 | } __attribute__ ((packed)); | ||
189 | |||
190 | struct zfcp_dbf_san_record_ct_response { | ||
191 | u16 cmd_rsp_code; | ||
192 | u8 revision; | ||
193 | u8 reason_code; | ||
194 | u8 expl; | ||
195 | u8 vendor_unique; | ||
196 | u16 max_res_size; | ||
197 | u32 len; | ||
198 | } __attribute__ ((packed)); | ||
199 | |||
200 | struct zfcp_dbf_san_record_els { | ||
201 | u32 d_id; | ||
202 | } __attribute__ ((packed)); | ||
203 | |||
204 | struct zfcp_dbf_san_record { | ||
205 | u8 tag[ZFCP_DBF_TAG_SIZE]; | ||
206 | u64 fsf_reqid; | ||
207 | u32 fsf_seqno; | ||
208 | union { | ||
209 | struct zfcp_dbf_san_record_ct_request ct_req; | ||
210 | struct zfcp_dbf_san_record_ct_response ct_resp; | ||
211 | struct zfcp_dbf_san_record_els els; | ||
212 | } u; | ||
213 | } __attribute__ ((packed)); | ||
214 | |||
215 | #define ZFCP_DBF_SAN_MAX_PAYLOAD 1024 | ||
216 | |||
217 | struct zfcp_dbf_scsi_record { | 207 | struct zfcp_dbf_scsi_record { |
218 | u8 tag[ZFCP_DBF_TAG_SIZE]; | 208 | u8 tag[ZFCP_DBF_TAG_SIZE]; |
219 | u8 tag2[ZFCP_DBF_TAG_SIZE]; | 209 | u8 tag2[ZFCP_DBF_TAG_SIZE]; |
@@ -250,7 +240,7 @@ struct zfcp_dbf { | |||
250 | spinlock_t scsi_lock; | 240 | spinlock_t scsi_lock; |
251 | struct zfcp_dbf_rec rec_buf; | 241 | struct zfcp_dbf_rec rec_buf; |
252 | struct zfcp_dbf_hba_record hba_buf; | 242 | struct zfcp_dbf_hba_record hba_buf; |
253 | struct zfcp_dbf_san_record san_buf; | 243 | struct zfcp_dbf_san san_buf; |
254 | struct zfcp_dbf_scsi_record scsi_buf; | 244 | struct zfcp_dbf_scsi_record scsi_buf; |
255 | struct zfcp_adapter *adapter; | 245 | struct zfcp_adapter *adapter; |
256 | }; | 246 | }; |