hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/include/uapi/scsi/scsi_bsg_fc.h
....@@ -3,25 +3,12 @@
33 * FC Transport BSG Interface
44 *
55 * 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
- *
216 */
227
238 #ifndef SCSI_BSG_FC_H
249 #define SCSI_BSG_FC_H
10
+
11
+#include <linux/types.h>
2512
2613 /*
2714 * This file intended to be included by both kernel and user space
....@@ -81,10 +68,10 @@
8168 * with the transport upon completion of the login.
8269 */
8370 struct fc_bsg_host_add_rport {
84
- uint8_t reserved;
71
+ __u8 reserved;
8572
8673 /* FC Address Identier of the remote port to login to */
87
- uint8_t port_id[3];
74
+ __u8 port_id[3];
8875 };
8976
9077 /* Response:
....@@ -102,10 +89,10 @@
10289 * remain logged in with the remote port.
10390 */
10491 struct fc_bsg_host_del_rport {
105
- uint8_t reserved;
92
+ __u8 reserved;
10693
10794 /* FC Address Identier of the remote port to logout of */
108
- uint8_t port_id[3];
95
+ __u8 port_id[3];
10996 };
11097
11198 /* Response:
....@@ -126,10 +113,10 @@
126113 * ELS Command Code being sent (must be the same as byte 0
127114 * of the payload)
128115 */
129
- uint8_t command_code;
116
+ __u8 command_code;
130117
131118 /* FC Address Identier of the remote port to send the ELS to */
132
- uint8_t port_id[3];
119
+ __u8 port_id[3];
133120 };
134121
135122 /* Response:
....@@ -166,14 +153,14 @@
166153 * Note: x_RJT/BSY status will indicae that the rjt_data field
167154 * is valid and contains the reason/explanation values.
168155 */
169
- uint32_t status; /* See FC_CTELS_STATUS_xxx */
156
+ __u32 status; /* See FC_CTELS_STATUS_xxx */
170157
171158 /* valid if status is not FC_CTELS_STATUS_OK */
172159 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;
177164 } rjt_data;
178165 };
179166
....@@ -189,17 +176,17 @@
189176 * and whether to tear it down after the request.
190177 */
191178 struct fc_bsg_host_ct {
192
- uint8_t reserved;
179
+ __u8 reserved;
193180
194181 /* FC Address Identier of the remote port to send the ELS to */
195
- uint8_t port_id[3];
182
+ __u8 port_id[3];
196183
197184 /*
198185 * We need words 0-2 of the generic preamble for the LLD's
199186 */
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 */
203190
204191 };
205192 /* Response:
....@@ -219,17 +206,17 @@
219206 * Identifies the vendor that the message is formatted for. This
220207 * should be the recipient of the message.
221208 */
222
- uint64_t vendor_id;
209
+ __u64 vendor_id;
223210
224211 /* start of vendor command area */
225
- uint32_t vendor_cmd[0];
212
+ __u32 vendor_cmd[0];
226213 };
227214
228215 /* Response:
229216 */
230217 struct fc_bsg_host_vendor_reply {
231218 /* start of vendor response area */
232
- uint32_t vendor_rsp[0];
219
+ __u32 vendor_rsp[0];
233220 };
234221
235222
....@@ -248,7 +235,7 @@
248235 * ELS Command Code being sent (must be the same as
249236 * byte 0 of the payload)
250237 */
251
- uint8_t els_code;
238
+ __u8 els_code;
252239 };
253240
254241 /* Response:
....@@ -266,9 +253,9 @@
266253 /*
267254 * We need words 0-2 of the generic preamble for the LLD's
268255 */
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 */
272259 };
273260 /* Response:
274261 *
....@@ -280,7 +267,7 @@
280267
281268 /* request (CDB) structure of the sg_io_v4 */
282269 struct fc_bsg_request {
283
- uint32_t msgcode;
270
+ __u32 msgcode;
284271 union {
285272 struct fc_bsg_host_add_rport h_addrport;
286273 struct fc_bsg_host_del_rport h_delrport;
....@@ -304,10 +291,10 @@
304291 * msg and status fields. The per-msgcode reply structure
305292 * will contain valid data.
306293 */
307
- uint32_t result;
294
+ __u32 result;
308295
309296 /* If there was reply_payload, how much was recevied ? */
310
- uint32_t reply_payload_rcv_len;
297
+ __u32 reply_payload_rcv_len;
311298
312299 union {
313300 struct fc_bsg_host_vendor_reply vendor_reply;