aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/iscsi_proto.h30
1 files changed, 22 insertions, 8 deletions
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h
index dd0a52cea95..a9c9058ffc6 100644
--- a/include/scsi/iscsi_proto.h
+++ b/include/scsi/iscsi_proto.h
@@ -116,7 +116,7 @@ struct iscsi_ahs_hdr {
116#define ISCSI_CDB_SIZE 16 116#define ISCSI_CDB_SIZE 16
117 117
118/* iSCSI PDU Header */ 118/* iSCSI PDU Header */
119struct iscsi_cmd { 119struct iscsi_scsi_req {
120 uint8_t opcode; 120 uint8_t opcode;
121 uint8_t flags; 121 uint8_t flags;
122 __be16 rsvd2; 122 __be16 rsvd2;
@@ -161,7 +161,7 @@ struct iscsi_ecdb_ahdr {
161}; 161};
162 162
163/* SCSI Response Header */ 163/* SCSI Response Header */
164struct iscsi_cmd_rsp { 164struct iscsi_scsi_rsp {
165 uint8_t opcode; 165 uint8_t opcode;
166 uint8_t flags; 166 uint8_t flags;
167 uint8_t response; 167 uint8_t response;
@@ -406,7 +406,7 @@ struct iscsi_text_rsp {
406}; 406};
407 407
408/* Login Header */ 408/* Login Header */
409struct iscsi_login { 409struct iscsi_login_req {
410 uint8_t opcode; 410 uint8_t opcode;
411 uint8_t flags; 411 uint8_t flags;
412 uint8_t max_version; /* Max. version supported */ 412 uint8_t max_version; /* Max. version supported */
@@ -427,7 +427,13 @@ struct iscsi_login {
427#define ISCSI_FLAG_LOGIN_TRANSIT 0x80 427#define ISCSI_FLAG_LOGIN_TRANSIT 0x80
428#define ISCSI_FLAG_LOGIN_CONTINUE 0x40 428#define ISCSI_FLAG_LOGIN_CONTINUE 0x40
429#define ISCSI_FLAG_LOGIN_CURRENT_STAGE_MASK 0x0C /* 2 bits */ 429#define ISCSI_FLAG_LOGIN_CURRENT_STAGE_MASK 0x0C /* 2 bits */
430#define ISCSI_FLAG_LOGIN_CURRENT_STAGE1 0x04
431#define ISCSI_FLAG_LOGIN_CURRENT_STAGE2 0x08
432#define ISCSI_FLAG_LOGIN_CURRENT_STAGE3 0x0C
430#define ISCSI_FLAG_LOGIN_NEXT_STAGE_MASK 0x03 /* 2 bits */ 433#define ISCSI_FLAG_LOGIN_NEXT_STAGE_MASK 0x03 /* 2 bits */
434#define ISCSI_FLAG_LOGIN_NEXT_STAGE1 0x01
435#define ISCSI_FLAG_LOGIN_NEXT_STAGE2 0x02
436#define ISCSI_FLAG_LOGIN_NEXT_STAGE3 0x03
431 437
432#define ISCSI_LOGIN_CURRENT_STAGE(flags) \ 438#define ISCSI_LOGIN_CURRENT_STAGE(flags) \
433 ((flags & ISCSI_FLAG_LOGIN_CURRENT_STAGE_MASK) >> 2) 439 ((flags & ISCSI_FLAG_LOGIN_CURRENT_STAGE_MASK) >> 2)
@@ -550,17 +556,25 @@ struct iscsi_logout_rsp {
550struct iscsi_snack { 556struct iscsi_snack {
551 uint8_t opcode; 557 uint8_t opcode;
552 uint8_t flags; 558 uint8_t flags;
553 uint8_t rsvd2[14]; 559 uint8_t rsvd2[2];
560 uint8_t hlength;
561 uint8_t dlength[3];
562 uint8_t lun[8];
554 itt_t itt; 563 itt_t itt;
564 __be32 ttt;
565 uint8_t rsvd3[4];
566 __be32 exp_statsn;
567 uint8_t rsvd4[8];
555 __be32 begrun; 568 __be32 begrun;
556 __be32 runlength; 569 __be32 runlength;
557 __be32 exp_statsn;
558 __be32 rsvd3;
559 __be32 exp_datasn;
560 uint8_t rsvd6[8];
561}; 570};
562 571
563/* SNACK PDU flags */ 572/* SNACK PDU flags */
573#define ISCSI_FLAG_SNACK_TYPE_DATA 0
574#define ISCSI_FLAG_SNACK_TYPE_R2T 0
575#define ISCSI_FLAG_SNACK_TYPE_STATUS 1
576#define ISCSI_FLAG_SNACK_TYPE_DATA_ACK 2
577#define ISCSI_FLAG_SNACK_TYPE_RDATA 3
564#define ISCSI_FLAG_SNACK_TYPE_MASK 0x0F /* 4 bits */ 578#define ISCSI_FLAG_SNACK_TYPE_MASK 0x0F /* 4 bits */
565 579
566/* Reject Message Header */ 580/* Reject Message Header */