aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2005-09-12 22:01:38 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-09-20 13:33:30 -0400
commitbaebc497b43a69d7280af226e08214c527220d45 (patch)
treeda4cdd85f1eb49cea03d420e8f2eb055fb3d0a8a /include/scsi
parentbb052349798f775d4d7ed20ffcf1510287d8abe6 (diff)
[SCSI] iscsi: update some iscsi proto defs
From: michaelc@cs.wisc.edu Cleanup some iscsi_proto defs, add some missing values, and fix some defs. Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/iscsi_proto.h45
1 files changed, 33 insertions, 12 deletions
diff --git a/include/scsi/iscsi_proto.h b/include/scsi/iscsi_proto.h
index 6c08551c79f5..8d3190480441 100644
--- a/include/scsi/iscsi_proto.h
+++ b/include/scsi/iscsi_proto.h
@@ -56,7 +56,8 @@ struct iscsi_hdr {
56 __be32 ttt; /* Target Task Tag */ 56 __be32 ttt; /* Target Task Tag */
57 __be32 statsn; 57 __be32 statsn;
58 __be32 exp_statsn; 58 __be32 exp_statsn;
59 uint8_t other[16]; 59 __be32 max_statsn;
60 uint8_t other[12];
60}; 61};
61 62
62/************************* RFC 3720 Begin *****************************/ 63/************************* RFC 3720 Begin *****************************/
@@ -78,6 +79,11 @@ struct iscsi_hdr {
78#define ISCSI_OP_LOGOUT 0x06 79#define ISCSI_OP_LOGOUT 0x06
79#define ISCSI_OP_SNACK 0x10 80#define ISCSI_OP_SNACK 0x10
80 81
82#define ISCSI_OP_VENDOR1_CMD 0x1c
83#define ISCSI_OP_VENDOR2_CMD 0x1d
84#define ISCSI_OP_VENDOR3_CMD 0x1e
85#define ISCSI_OP_VENDOR4_CMD 0x1f
86
81/* Target Opcode values */ 87/* Target Opcode values */
82#define ISCSI_OP_NOOP_IN 0x20 88#define ISCSI_OP_NOOP_IN 0x20
83#define ISCSI_OP_SCSI_CMD_RSP 0x21 89#define ISCSI_OP_SCSI_CMD_RSP 0x21
@@ -90,12 +96,20 @@ struct iscsi_hdr {
90#define ISCSI_OP_ASYNC_EVENT 0x32 96#define ISCSI_OP_ASYNC_EVENT 0x32
91#define ISCSI_OP_REJECT 0x3f 97#define ISCSI_OP_REJECT 0x3f
92 98
99struct iscsi_ahs_hdr {
100 __be16 ahslength;
101 uint8_t ahstype;
102 uint8_t ahspec[5];
103};
104
105#define ISCSI_AHSTYPE_CDB 1
106#define ISCSI_AHSTYPE_RLENGTH 2
107
93/* iSCSI PDU Header */ 108/* iSCSI PDU Header */
94struct iscsi_cmd { 109struct iscsi_cmd {
95 uint8_t opcode; 110 uint8_t opcode;
96 uint8_t flags; 111 uint8_t flags;
97 uint8_t rsvd2; 112 __be16 rsvd2;
98 uint8_t cmdrn;
99 uint8_t hlength; 113 uint8_t hlength;
100 uint8_t dlength[3]; 114 uint8_t dlength[3];
101 uint8_t lun[8]; 115 uint8_t lun[8];
@@ -120,6 +134,13 @@ struct iscsi_cmd {
120#define ISCSI_ATTR_HEAD_OF_QUEUE 3 134#define ISCSI_ATTR_HEAD_OF_QUEUE 3
121#define ISCSI_ATTR_ACA 4 135#define ISCSI_ATTR_ACA 4
122 136
137struct iscsi_rlength_ahdr {
138 __be16 ahslength;
139 uint8_t ahstype;
140 uint8_t reserved;
141 __be32 read_length;
142};
143
123/* SCSI Response Header */ 144/* SCSI Response Header */
124struct iscsi_cmd_rsp { 145struct iscsi_cmd_rsp {
125 uint8_t opcode; 146 uint8_t opcode;
@@ -227,7 +248,7 @@ struct iscsi_tm {
227 uint8_t rsvd2[8]; 248 uint8_t rsvd2[8];
228}; 249};
229 250
230#define ISCSI_FLAG_TASK_MGMT_FUNCTION_MASK 0x7F 251#define ISCSI_FLAG_TM_FUNC_MASK 0x7F
231 252
232/* Function values */ 253/* Function values */
233#define ISCSI_TM_FUNC_ABORT_TASK 1 254#define ISCSI_TM_FUNC_ABORT_TASK 1
@@ -257,14 +278,14 @@ struct iscsi_tm_rsp {
257}; 278};
258 279
259/* Response values */ 280/* Response values */
260#define SCSI_TCP_TM_RESP_COMPLETE 0x00 281#define ISCSI_TMF_RSP_COMPLETE 0x00
261#define SCSI_TCP_TM_RESP_NO_TASK 0x01 282#define ISCSI_TMF_RSP_NO_TASK 0x01
262#define SCSI_TCP_TM_RESP_NO_LUN 0x02 283#define ISCSI_TMF_RSP_NO_LUN 0x02
263#define SCSI_TCP_TM_RESP_TASK_ALLEGIANT 0x03 284#define ISCSI_TMF_RSP_TASK_ALLEGIANT 0x03
264#define SCSI_TCP_TM_RESP_NO_FAILOVER 0x04 285#define ISCSI_TMF_RSP_NO_FAILOVER 0x04
265#define SCSI_TCP_TM_RESP_NOT_SUPPORTED 0x05 286#define ISCSI_TMF_RSP_NOT_SUPPORTED 0x05
266#define SCSI_TCP_TM_RESP_AUTH_FAILED 0x06 287#define ISCSI_TMF_RSP_AUTH_FAILED 0x06
267#define SCSI_TCP_TM_RESP_REJECTED 0xff 288#define ISCSI_TMF_RSP_REJECTED 0xff
268 289
269/* Ready To Transfer Header */ 290/* Ready To Transfer Header */
270struct iscsi_r2t_rsp { 291struct iscsi_r2t_rsp {