2 * This file is part of the zfcp device driver for
3 * FCP adapters for IBM System z9 and zSeries.
5 * Copyright IBM Corp. 2008, 2008
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 #define ZFCP_DBF_TAG_SIZE 4
29 struct zfcp_dbf_dump {
30 u8 tag[ZFCP_DBF_TAG_SIZE];
31 u32 total_size; /* size of total dump data */
32 u32 offset; /* how much data has being already dumped */
33 u32 size; /* how much data comes with this record */
34 u8 data[]; /* dump data */
35 } __attribute__ ((packed));
37 struct zfcp_rec_dbf_record_thread {
42 } __attribute__ ((packed));
44 struct zfcp_rec_dbf_record_target {
51 } __attribute__ ((packed));
53 struct zfcp_rec_dbf_record_trigger {
63 } __attribute__ ((packed));
65 struct zfcp_rec_dbf_record_action {
70 } __attribute__ ((packed));
72 struct zfcp_rec_dbf_record {
76 struct zfcp_rec_dbf_record_action action;
77 struct zfcp_rec_dbf_record_thread thread;
78 struct zfcp_rec_dbf_record_target target;
79 struct zfcp_rec_dbf_record_trigger trigger;
81 } __attribute__ ((packed));
84 ZFCP_REC_DBF_ID_ACTION,
85 ZFCP_REC_DBF_ID_THREAD,
86 ZFCP_REC_DBF_ID_TARGET,
87 ZFCP_REC_DBF_ID_TRIGGER,
90 struct zfcp_hba_dbf_record_response {
97 u8 fsf_prot_status_qual[FSF_PROT_STATUS_QUAL_SIZE];
98 u8 fsf_status_qual[FSF_STATUS_QUALIFIER_SIZE];
126 } __attribute__ ((packed));
128 struct zfcp_hba_dbf_record_status {
132 struct fsf_queue_designator
135 #define ZFCP_DBF_UNSOL_PAYLOAD 80
136 #define ZFCP_DBF_UNSOL_PAYLOAD_SENSE_DATA_AVAIL 32
137 #define ZFCP_DBF_UNSOL_PAYLOAD_BIT_ERROR_THRESHOLD 56
138 #define ZFCP_DBF_UNSOL_PAYLOAD_FEATURE_UPDATE_ALERT 2 * sizeof(u32)
139 u8 payload[ZFCP_DBF_UNSOL_PAYLOAD];
140 } __attribute__ ((packed));
142 struct zfcp_hba_dbf_record_qdio {
148 } __attribute__ ((packed));
150 struct zfcp_hba_dbf_record {
151 u8 tag[ZFCP_DBF_TAG_SIZE];
152 u8 tag2[ZFCP_DBF_TAG_SIZE];
154 struct zfcp_hba_dbf_record_response response;
155 struct zfcp_hba_dbf_record_status status;
156 struct zfcp_hba_dbf_record_qdio qdio;
158 } __attribute__ ((packed));
160 struct zfcp_san_dbf_record_ct_request {
168 #define ZFCP_DBF_CT_PAYLOAD 24
169 u8 payload[ZFCP_DBF_CT_PAYLOAD];
170 } __attribute__ ((packed));
172 struct zfcp_san_dbf_record_ct_response {
179 u8 payload[ZFCP_DBF_CT_PAYLOAD];
180 } __attribute__ ((packed));
182 struct zfcp_san_dbf_record_els {
185 #define ZFCP_DBF_ELS_PAYLOAD 32
186 #define ZFCP_DBF_ELS_MAX_PAYLOAD 1024
187 u8 payload[ZFCP_DBF_ELS_PAYLOAD];
188 } __attribute__ ((packed));
190 struct zfcp_san_dbf_record {
191 u8 tag[ZFCP_DBF_TAG_SIZE];
197 struct zfcp_san_dbf_record_ct_request ct_req;
198 struct zfcp_san_dbf_record_ct_response ct_resp;
199 struct zfcp_san_dbf_record_els els;
201 } __attribute__ ((packed));
203 struct zfcp_scsi_dbf_record {
204 u8 tag[ZFCP_DBF_TAG_SIZE];
205 u8 tag2[ZFCP_DBF_TAG_SIZE];
211 #define ZFCP_DBF_SCSI_OPCODE 16
212 u8 scsi_opcode[ZFCP_DBF_SCSI_OPCODE];
223 #define ZFCP_DBF_SCSI_FCP_SNS_INFO 16
224 #define ZFCP_DBF_SCSI_MAX_FCP_SNS_INFO 256
226 u8 sns_info[ZFCP_DBF_SCSI_FCP_SNS_INFO];
227 } __attribute__ ((packed));
229 #endif /* ZFCP_DBF_H */