aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorAndy Grover <agrover@redhat.com>2011-06-16 18:57:09 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 17:22:13 -0400
commit516f43a2a555000e77c1d59b8298cb46aad9ecc1 (patch)
tree1e9fe8742e1c70cdf65e9f3f926ea30075e09131 /include/scsi
parent2e00d24e7ebae3183aeab0f958ea1142d1af3a02 (diff)
[SCSI] iscsi: Use struct scsi_lun in iscsi structs instead of u8[8]
struct scsi_lun is also just a struct with an array of 8 octets (64 bits) but using it instead in iscsi structs lets us call scsilun_to_int without a cast, and also lets us copy it using assignment, instead of memcpy(). Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/iscsi_proto.h18
-rw-r--r--include/scsi/libiscsi.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h
index dd0a52cea95a..ea68b3c56dbf 100644
--- a/include/scsi/iscsi_proto.h
+++ b/include/scsi/iscsi_proto.h
@@ -60,7 +60,7 @@ struct iscsi_hdr {
60 uint8_t rsvd2[2]; 60 uint8_t rsvd2[2];
61 uint8_t hlength; /* AHSs total length */ 61 uint8_t hlength; /* AHSs total length */
62 uint8_t dlength[3]; /* Data length */ 62 uint8_t dlength[3]; /* Data length */
63 uint8_t lun[8]; 63 struct scsi_lun lun;
64 itt_t itt; /* Initiator Task Tag, opaque for target */ 64 itt_t itt; /* Initiator Task Tag, opaque for target */
65 __be32 ttt; /* Target Task Tag */ 65 __be32 ttt; /* Target Task Tag */
66 __be32 statsn; 66 __be32 statsn;
@@ -122,7 +122,7 @@ struct iscsi_cmd {
122 __be16 rsvd2; 122 __be16 rsvd2;
123 uint8_t hlength; 123 uint8_t hlength;
124 uint8_t dlength[3]; 124 uint8_t dlength[3];
125 uint8_t lun[8]; 125 struct scsi_lun lun;
126 itt_t itt; /* Initiator Task Tag */ 126 itt_t itt; /* Initiator Task Tag */
127 __be32 data_length; 127 __be32 data_length;
128 __be32 cmdsn; 128 __be32 cmdsn;
@@ -198,7 +198,7 @@ struct iscsi_async {
198 uint8_t rsvd2[2]; 198 uint8_t rsvd2[2];
199 uint8_t rsvd3; 199 uint8_t rsvd3;
200 uint8_t dlength[3]; 200 uint8_t dlength[3];
201 uint8_t lun[8]; 201 struct scsi_lun lun;
202 uint8_t rsvd4[8]; 202 uint8_t rsvd4[8];
203 __be32 statsn; 203 __be32 statsn;
204 __be32 exp_cmdsn; 204 __be32 exp_cmdsn;
@@ -226,7 +226,7 @@ struct iscsi_nopout {
226 __be16 rsvd2; 226 __be16 rsvd2;
227 uint8_t rsvd3; 227 uint8_t rsvd3;
228 uint8_t dlength[3]; 228 uint8_t dlength[3];
229 uint8_t lun[8]; 229 struct scsi_lun lun;
230 itt_t itt; /* Initiator Task Tag */ 230 itt_t itt; /* Initiator Task Tag */
231 __be32 ttt; /* Target Transfer Tag */ 231 __be32 ttt; /* Target Transfer Tag */
232 __be32 cmdsn; 232 __be32 cmdsn;
@@ -241,7 +241,7 @@ struct iscsi_nopin {
241 __be16 rsvd2; 241 __be16 rsvd2;
242 uint8_t rsvd3; 242 uint8_t rsvd3;
243 uint8_t dlength[3]; 243 uint8_t dlength[3];
244 uint8_t lun[8]; 244 struct scsi_lun lun;
245 itt_t itt; /* Initiator Task Tag */ 245 itt_t itt; /* Initiator Task Tag */
246 __be32 ttt; /* Target Transfer Tag */ 246 __be32 ttt; /* Target Transfer Tag */
247 __be32 statsn; 247 __be32 statsn;
@@ -257,7 +257,7 @@ struct iscsi_tm {
257 uint8_t rsvd1[2]; 257 uint8_t rsvd1[2];
258 uint8_t hlength; 258 uint8_t hlength;
259 uint8_t dlength[3]; 259 uint8_t dlength[3];
260 uint8_t lun[8]; 260 struct scsi_lun lun;
261 itt_t itt; /* Initiator Task Tag */ 261 itt_t itt; /* Initiator Task Tag */
262 itt_t rtt; /* Reference Task Tag */ 262 itt_t rtt; /* Reference Task Tag */
263 __be32 cmdsn; 263 __be32 cmdsn;
@@ -315,7 +315,7 @@ struct iscsi_r2t_rsp {
315 uint8_t rsvd2[2]; 315 uint8_t rsvd2[2];
316 uint8_t hlength; 316 uint8_t hlength;
317 uint8_t dlength[3]; 317 uint8_t dlength[3];
318 uint8_t lun[8]; 318 struct scsi_lun lun;
319 itt_t itt; /* Initiator Task Tag */ 319 itt_t itt; /* Initiator Task Tag */
320 __be32 ttt; /* Target Transfer Tag */ 320 __be32 ttt; /* Target Transfer Tag */
321 __be32 statsn; 321 __be32 statsn;
@@ -333,7 +333,7 @@ struct iscsi_data {
333 uint8_t rsvd2[2]; 333 uint8_t rsvd2[2];
334 uint8_t rsvd3; 334 uint8_t rsvd3;
335 uint8_t dlength[3]; 335 uint8_t dlength[3];
336 uint8_t lun[8]; 336 struct scsi_lun lun;
337 itt_t itt; 337 itt_t itt;
338 __be32 ttt; 338 __be32 ttt;
339 __be32 rsvd4; 339 __be32 rsvd4;
@@ -353,7 +353,7 @@ struct iscsi_data_rsp {
353 uint8_t cmd_status; 353 uint8_t cmd_status;
354 uint8_t hlength; 354 uint8_t hlength;
355 uint8_t dlength[3]; 355 uint8_t dlength[3];
356 uint8_t lun[8]; 356 struct scsi_lun lun;
357 itt_t itt; 357 itt_t itt;
358 __be32 ttt; 358 __be32 ttt;
359 __be32 statsn; 359 __be32 statsn;
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 0f4367751b71..cedcff371c88 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -115,7 +115,7 @@ struct iscsi_task {
115 /* copied values in case we need to send tmfs */ 115 /* copied values in case we need to send tmfs */
116 itt_t hdr_itt; 116 itt_t hdr_itt;
117 __be32 cmdsn; 117 __be32 cmdsn;
118 uint8_t lun[8]; 118 struct scsi_lun lun;
119 119
120 int itt; /* this ITT */ 120 int itt; /* this ITT */
121 121