.. | .. |
---|
3 | 3 | * FC Transport BSG Interface |
---|
4 | 4 | * |
---|
5 | 5 | * Copyright (C) 2008 James Smart, Emulex Corporation |
---|
6 | | - * |
---|
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 of the License, or |
---|
10 | | - * (at your option) any later version. |
---|
11 | | - * |
---|
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. |
---|
16 | | - * |
---|
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
20 | | - * |
---|
21 | 6 | */ |
---|
22 | 7 | |
---|
23 | 8 | #ifndef SCSI_BSG_FC_H |
---|
24 | 9 | #define SCSI_BSG_FC_H |
---|
| 10 | + |
---|
| 11 | +#include <linux/types.h> |
---|
25 | 12 | |
---|
26 | 13 | /* |
---|
27 | 14 | * This file intended to be included by both kernel and user space |
---|
.. | .. |
---|
81 | 68 | * with the transport upon completion of the login. |
---|
82 | 69 | */ |
---|
83 | 70 | struct fc_bsg_host_add_rport { |
---|
84 | | - uint8_t reserved; |
---|
| 71 | + __u8 reserved; |
---|
85 | 72 | |
---|
86 | 73 | /* FC Address Identier of the remote port to login to */ |
---|
87 | | - uint8_t port_id[3]; |
---|
| 74 | + __u8 port_id[3]; |
---|
88 | 75 | }; |
---|
89 | 76 | |
---|
90 | 77 | /* Response: |
---|
.. | .. |
---|
102 | 89 | * remain logged in with the remote port. |
---|
103 | 90 | */ |
---|
104 | 91 | struct fc_bsg_host_del_rport { |
---|
105 | | - uint8_t reserved; |
---|
| 92 | + __u8 reserved; |
---|
106 | 93 | |
---|
107 | 94 | /* FC Address Identier of the remote port to logout of */ |
---|
108 | | - uint8_t port_id[3]; |
---|
| 95 | + __u8 port_id[3]; |
---|
109 | 96 | }; |
---|
110 | 97 | |
---|
111 | 98 | /* Response: |
---|
.. | .. |
---|
126 | 113 | * ELS Command Code being sent (must be the same as byte 0 |
---|
127 | 114 | * of the payload) |
---|
128 | 115 | */ |
---|
129 | | - uint8_t command_code; |
---|
| 116 | + __u8 command_code; |
---|
130 | 117 | |
---|
131 | 118 | /* FC Address Identier of the remote port to send the ELS to */ |
---|
132 | | - uint8_t port_id[3]; |
---|
| 119 | + __u8 port_id[3]; |
---|
133 | 120 | }; |
---|
134 | 121 | |
---|
135 | 122 | /* Response: |
---|
.. | .. |
---|
166 | 153 | * Note: x_RJT/BSY status will indicae that the rjt_data field |
---|
167 | 154 | * is valid and contains the reason/explanation values. |
---|
168 | 155 | */ |
---|
169 | | - uint32_t status; /* See FC_CTELS_STATUS_xxx */ |
---|
| 156 | + __u32 status; /* See FC_CTELS_STATUS_xxx */ |
---|
170 | 157 | |
---|
171 | 158 | /* valid if status is not FC_CTELS_STATUS_OK */ |
---|
172 | 159 | struct { |
---|
173 | | - uint8_t action; /* fragment_id for CT REJECT */ |
---|
174 | | - uint8_t reason_code; |
---|
175 | | - uint8_t reason_explanation; |
---|
176 | | - uint8_t vendor_unique; |
---|
| 160 | + __u8 action; /* fragment_id for CT REJECT */ |
---|
| 161 | + __u8 reason_code; |
---|
| 162 | + __u8 reason_explanation; |
---|
| 163 | + __u8 vendor_unique; |
---|
177 | 164 | } rjt_data; |
---|
178 | 165 | }; |
---|
179 | 166 | |
---|
.. | .. |
---|
189 | 176 | * and whether to tear it down after the request. |
---|
190 | 177 | */ |
---|
191 | 178 | struct fc_bsg_host_ct { |
---|
192 | | - uint8_t reserved; |
---|
| 179 | + __u8 reserved; |
---|
193 | 180 | |
---|
194 | 181 | /* FC Address Identier of the remote port to send the ELS to */ |
---|
195 | | - uint8_t port_id[3]; |
---|
| 182 | + __u8 port_id[3]; |
---|
196 | 183 | |
---|
197 | 184 | /* |
---|
198 | 185 | * We need words 0-2 of the generic preamble for the LLD's |
---|
199 | 186 | */ |
---|
200 | | - uint32_t preamble_word0; /* revision & IN_ID */ |
---|
201 | | - uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ |
---|
202 | | - uint32_t preamble_word2; /* Cmd Code, Max Size */ |
---|
| 187 | + __u32 preamble_word0; /* revision & IN_ID */ |
---|
| 188 | + __u32 preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ |
---|
| 189 | + __u32 preamble_word2; /* Cmd Code, Max Size */ |
---|
203 | 190 | |
---|
204 | 191 | }; |
---|
205 | 192 | /* Response: |
---|
.. | .. |
---|
219 | 206 | * Identifies the vendor that the message is formatted for. This |
---|
220 | 207 | * should be the recipient of the message. |
---|
221 | 208 | */ |
---|
222 | | - uint64_t vendor_id; |
---|
| 209 | + __u64 vendor_id; |
---|
223 | 210 | |
---|
224 | 211 | /* start of vendor command area */ |
---|
225 | | - uint32_t vendor_cmd[0]; |
---|
| 212 | + __u32 vendor_cmd[0]; |
---|
226 | 213 | }; |
---|
227 | 214 | |
---|
228 | 215 | /* Response: |
---|
229 | 216 | */ |
---|
230 | 217 | struct fc_bsg_host_vendor_reply { |
---|
231 | 218 | /* start of vendor response area */ |
---|
232 | | - uint32_t vendor_rsp[0]; |
---|
| 219 | + __u32 vendor_rsp[0]; |
---|
233 | 220 | }; |
---|
234 | 221 | |
---|
235 | 222 | |
---|
.. | .. |
---|
248 | 235 | * ELS Command Code being sent (must be the same as |
---|
249 | 236 | * byte 0 of the payload) |
---|
250 | 237 | */ |
---|
251 | | - uint8_t els_code; |
---|
| 238 | + __u8 els_code; |
---|
252 | 239 | }; |
---|
253 | 240 | |
---|
254 | 241 | /* Response: |
---|
.. | .. |
---|
266 | 253 | /* |
---|
267 | 254 | * We need words 0-2 of the generic preamble for the LLD's |
---|
268 | 255 | */ |
---|
269 | | - uint32_t preamble_word0; /* revision & IN_ID */ |
---|
270 | | - uint32_t preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ |
---|
271 | | - uint32_t preamble_word2; /* Cmd Code, Max Size */ |
---|
| 256 | + __u32 preamble_word0; /* revision & IN_ID */ |
---|
| 257 | + __u32 preamble_word1; /* GS_Type, GS_SubType, Options, Rsvd */ |
---|
| 258 | + __u32 preamble_word2; /* Cmd Code, Max Size */ |
---|
272 | 259 | }; |
---|
273 | 260 | /* Response: |
---|
274 | 261 | * |
---|
.. | .. |
---|
280 | 267 | |
---|
281 | 268 | /* request (CDB) structure of the sg_io_v4 */ |
---|
282 | 269 | struct fc_bsg_request { |
---|
283 | | - uint32_t msgcode; |
---|
| 270 | + __u32 msgcode; |
---|
284 | 271 | union { |
---|
285 | 272 | struct fc_bsg_host_add_rport h_addrport; |
---|
286 | 273 | struct fc_bsg_host_del_rport h_delrport; |
---|
.. | .. |
---|
304 | 291 | * msg and status fields. The per-msgcode reply structure |
---|
305 | 292 | * will contain valid data. |
---|
306 | 293 | */ |
---|
307 | | - uint32_t result; |
---|
| 294 | + __u32 result; |
---|
308 | 295 | |
---|
309 | 296 | /* If there was reply_payload, how much was recevied ? */ |
---|
310 | | - uint32_t reply_payload_rcv_len; |
---|
| 297 | + __u32 reply_payload_rcv_len; |
---|
311 | 298 | |
---|
312 | 299 | union { |
---|
313 | 300 | struct fc_bsg_host_vendor_reply vendor_reply; |
---|