diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-11-24 10:54:10 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:02:13 -0500 |
commit | dbf5dfe9dbcecf159139eec25ad256738cbc3715 (patch) | |
tree | 1f1703cf4a270beb3e7046244123e62188de53f4 /drivers/s390/scsi/zfcp_def.h | |
parent | 9d05ce2c0a6704ff84df02cbb3baef94fcac4f5d (diff) |
[SCSI] zfcp: Use common code definitions for FC CT structs
Use common code definitions for FC GPN_FT and GID_PN
instead of inventing private ones. Move the private structs still
required inside zfcp to zfcp_fc header file.
Reviewed-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_def.h')
-rw-r--r-- | drivers/s390/scsi/zfcp_def.h | 74 |
1 files changed, 1 insertions, 73 deletions
diff --git a/drivers/s390/scsi/zfcp_def.h b/drivers/s390/scsi/zfcp_def.h index fae8f2ebd43f..c64821145475 100644 --- a/drivers/s390/scsi/zfcp_def.h +++ b/drivers/s390/scsi/zfcp_def.h | |||
@@ -75,25 +75,6 @@ | |||
75 | 75 | ||
76 | #define ZFCP_DID_MASK 0x00FFFFFF | 76 | #define ZFCP_DID_MASK 0x00FFFFFF |
77 | 77 | ||
78 | /* | ||
79 | * FC-GS-2 stuff | ||
80 | */ | ||
81 | #define ZFCP_CT_REVISION 0x01 | ||
82 | #define ZFCP_CT_DIRECTORY_SERVICE 0xFC | ||
83 | #define ZFCP_CT_NAME_SERVER 0x02 | ||
84 | #define ZFCP_CT_SYNCHRONOUS 0x00 | ||
85 | #define ZFCP_CT_SCSI_FCP 0x08 | ||
86 | #define ZFCP_CT_UNABLE_TO_PERFORM_CMD 0x09 | ||
87 | #define ZFCP_CT_GID_PN 0x0121 | ||
88 | #define ZFCP_CT_GPN_FT 0x0172 | ||
89 | #define ZFCP_CT_ACCEPT 0x8002 | ||
90 | #define ZFCP_CT_REJECT 0x8001 | ||
91 | |||
92 | /* | ||
93 | * FC-GS-4 stuff | ||
94 | */ | ||
95 | #define ZFCP_CT_TIMEOUT (3 * R_A_TOV) | ||
96 | |||
97 | /*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ | 78 | /*************** ADAPTER/PORT/UNIT AND FSF_REQ STATUS FLAGS ******************/ |
98 | 79 | ||
99 | /* | 80 | /* |
@@ -119,9 +100,6 @@ | |||
119 | #define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100 | 100 | #define ZFCP_STATUS_ADAPTER_ERP_PENDING 0x00000100 |
120 | #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 | 101 | #define ZFCP_STATUS_ADAPTER_LINK_UNPLUGGED 0x00000200 |
121 | 102 | ||
122 | /* FC-PH/FC-GS well-known address identifiers for generic services */ | ||
123 | #define ZFCP_DID_WKA 0xFFFFF0 | ||
124 | |||
125 | /* remote port status */ | 103 | /* remote port status */ |
126 | #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 | 104 | #define ZFCP_STATUS_PORT_PHYS_OPEN 0x00000001 |
127 | #define ZFCP_STATUS_PORT_LINK_TEST 0x00000002 | 105 | #define ZFCP_STATUS_PORT_LINK_TEST 0x00000002 |
@@ -162,50 +140,10 @@ struct zfcp_adapter_mempool { | |||
162 | mempool_t *scsi_abort; | 140 | mempool_t *scsi_abort; |
163 | mempool_t *status_read_req; | 141 | mempool_t *status_read_req; |
164 | mempool_t *status_read_data; | 142 | mempool_t *status_read_data; |
165 | mempool_t *gid_pn_data; | 143 | mempool_t *gid_pn; |
166 | mempool_t *qtcb_pool; | 144 | mempool_t *qtcb_pool; |
167 | }; | 145 | }; |
168 | 146 | ||
169 | /* | ||
170 | * header for CT_IU | ||
171 | */ | ||
172 | struct ct_hdr { | ||
173 | u8 revision; // 0x01 | ||
174 | u8 in_id[3]; // 0x00 | ||
175 | u8 gs_type; // 0xFC Directory Service | ||
176 | u8 gs_subtype; // 0x02 Name Server | ||
177 | u8 options; // 0x00 single bidirectional exchange | ||
178 | u8 reserved0; | ||
179 | u16 cmd_rsp_code; // 0x0121 GID_PN, or 0x0100 GA_NXT | ||
180 | u16 max_res_size; // <= (4096 - 16) / 4 | ||
181 | u8 reserved1; | ||
182 | u8 reason_code; | ||
183 | u8 reason_code_expl; | ||
184 | u8 vendor_unique; | ||
185 | } __attribute__ ((packed)); | ||
186 | |||
187 | /* nameserver request CT_IU -- for requests where | ||
188 | * a port name is required */ | ||
189 | struct ct_iu_gid_pn_req { | ||
190 | struct ct_hdr header; | ||
191 | u64 wwpn; | ||
192 | } __attribute__ ((packed)); | ||
193 | |||
194 | /* FS_ACC IU and data unit for GID_PN nameserver request */ | ||
195 | struct ct_iu_gid_pn_resp { | ||
196 | struct ct_hdr header; | ||
197 | u32 d_id; | ||
198 | } __attribute__ ((packed)); | ||
199 | |||
200 | struct ct_iu_gpn_ft_req { | ||
201 | struct ct_hdr header; | ||
202 | u8 flags; | ||
203 | u8 domain_id_scope; | ||
204 | u8 area_id_scope; | ||
205 | u8 fc4_type; | ||
206 | } __attribute__ ((packed)); | ||
207 | |||
208 | |||
209 | /** | 147 | /** |
210 | * struct zfcp_send_ct - used to pass parameters to function zfcp_fsf_send_ct | 148 | * struct zfcp_send_ct - used to pass parameters to function zfcp_fsf_send_ct |
211 | * @wka_port: port where the request is sent to | 149 | * @wka_port: port where the request is sent to |
@@ -226,16 +164,6 @@ struct zfcp_send_ct { | |||
226 | int status; | 164 | int status; |
227 | }; | 165 | }; |
228 | 166 | ||
229 | /* used for name server requests in error recovery */ | ||
230 | struct zfcp_gid_pn_data { | ||
231 | struct zfcp_send_ct ct; | ||
232 | struct scatterlist req; | ||
233 | struct scatterlist resp; | ||
234 | struct ct_iu_gid_pn_req ct_iu_req; | ||
235 | struct ct_iu_gid_pn_resp ct_iu_resp; | ||
236 | struct zfcp_port *port; | ||
237 | }; | ||
238 | |||
239 | /** | 167 | /** |
240 | * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els | 168 | * struct zfcp_send_els - used to pass parameters to function zfcp_fsf_send_els |
241 | * @adapter: adapter where request is sent from | 169 | * @adapter: adapter where request is sent from |