diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-04-06 22:13:36 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-14 15:03:41 -0400 |
commit | fd7255f51a13ea915099c7e488001dfbbeb05104 (patch) | |
tree | 964624f68f000848dae1a9f4c396502849707826 /include/scsi/iscsi_if.h | |
parent | b5c7a12dc29ae0990d9e867749bdd717a3160325 (diff) |
[SCSI] iscsi: add sysfs attrs for uspace sync up
For iscsi boot when going from initramfs to the real root we
need to stop the userpsace iscsi daemon. To later restart it
iscsid needs to be able to rebuild itself and part of that
process is matching a session running the kernel with the
iscsid representation. To do this the attached patch
adds several required iscsi values. If the LLD does not provide
them becuase, login is done in userspace, then the transport
class and userspace set ths up for the LLD.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/iscsi_if.h')
-rw-r--r-- | include/scsi/iscsi_if.h | 64 |
1 files changed, 48 insertions, 16 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 933a91b1474e..2c3a89b64e71 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -86,7 +86,7 @@ struct iscsi_uevent { | |||
86 | uint32_t sid; | 86 | uint32_t sid; |
87 | uint32_t cid; | 87 | uint32_t cid; |
88 | uint32_t param; /* enum iscsi_param */ | 88 | uint32_t param; /* enum iscsi_param */ |
89 | uint32_t value; | 89 | uint32_t len; |
90 | } set_param; | 90 | } set_param; |
91 | struct msg_start_conn { | 91 | struct msg_start_conn { |
92 | uint32_t sid; | 92 | uint32_t sid; |
@@ -155,22 +155,54 @@ enum iscsi_err { | |||
155 | * iSCSI Parameters (RFC3720) | 155 | * iSCSI Parameters (RFC3720) |
156 | */ | 156 | */ |
157 | enum iscsi_param { | 157 | enum iscsi_param { |
158 | ISCSI_PARAM_MAX_RECV_DLENGTH = 0, | 158 | /* passed in using netlink set param */ |
159 | ISCSI_PARAM_MAX_XMIT_DLENGTH = 1, | 159 | ISCSI_PARAM_MAX_RECV_DLENGTH, |
160 | ISCSI_PARAM_HDRDGST_EN = 2, | 160 | ISCSI_PARAM_MAX_XMIT_DLENGTH, |
161 | ISCSI_PARAM_DATADGST_EN = 3, | 161 | ISCSI_PARAM_HDRDGST_EN, |
162 | ISCSI_PARAM_INITIAL_R2T_EN = 4, | 162 | ISCSI_PARAM_DATADGST_EN, |
163 | ISCSI_PARAM_MAX_R2T = 5, | 163 | ISCSI_PARAM_INITIAL_R2T_EN, |
164 | ISCSI_PARAM_IMM_DATA_EN = 6, | 164 | ISCSI_PARAM_MAX_R2T, |
165 | ISCSI_PARAM_FIRST_BURST = 7, | 165 | ISCSI_PARAM_IMM_DATA_EN, |
166 | ISCSI_PARAM_MAX_BURST = 8, | 166 | ISCSI_PARAM_FIRST_BURST, |
167 | ISCSI_PARAM_PDU_INORDER_EN = 9, | 167 | ISCSI_PARAM_MAX_BURST, |
168 | ISCSI_PARAM_DATASEQ_INORDER_EN = 10, | 168 | ISCSI_PARAM_PDU_INORDER_EN, |
169 | ISCSI_PARAM_ERL = 11, | 169 | ISCSI_PARAM_DATASEQ_INORDER_EN, |
170 | ISCSI_PARAM_IFMARKER_EN = 12, | 170 | ISCSI_PARAM_ERL, |
171 | ISCSI_PARAM_OFMARKER_EN = 13, | 171 | ISCSI_PARAM_IFMARKER_EN, |
172 | ISCSI_PARAM_OFMARKER_EN, | ||
173 | ISCSI_PARAM_TARGET_NAME, | ||
174 | ISCSI_PARAM_TPGT, | ||
175 | ISCSI_PARAM_PERSISTENT_ADDRESS, | ||
176 | ISCSI_PARAM_PERSISTENT_PORT, | ||
177 | |||
178 | /* pased in through bind conn using transport_fd */ | ||
179 | ISCSI_PARAM_CONN_PORT, | ||
180 | ISCSI_PARAM_CONN_ADDRESS, | ||
181 | |||
182 | /* must always be last */ | ||
183 | ISCSI_PARAM_MAX, | ||
172 | }; | 184 | }; |
173 | #define ISCSI_PARAM_MAX 14 | 185 | |
186 | #define ISCSI_MAX_RECV_DLENGTH (1 << ISCSI_PARAM_MAX_RECV_DLENGTH) | ||
187 | #define ISCSI_MAX_XMIT_DLENGTH (1 << ISCSI_PARAM_MAX_XMIT_DLENGTH) | ||
188 | #define ISCSI_HDRDGST_EN (1 << ISCSI_PARAM_HDRDGST_EN) | ||
189 | #define ISCSI_DATADGST_EN (1 << ISCSI_PARAM_DATADGST_EN) | ||
190 | #define ISCSI_INITIAL_R2T_EN (1 << ISCSI_PARAM_INITIAL_R2T_EN) | ||
191 | #define ISCSI_MAX_R2T (1 << ISCSI_PARAM_MAX_R2T) | ||
192 | #define ISCSI_IMM_DATA_EN (1 << ISCSI_PARAM_IMM_DATA_EN) | ||
193 | #define ISCSI_FIRST_BURST (1 << ISCSI_PARAM_FIRST_BURST) | ||
194 | #define ISCSI_MAX_BURST (1 << ISCSI_PARAM_MAX_BURST) | ||
195 | #define ISCSI_PDU_INORDER_EN (1 << ISCSI_PARAM_PDU_INORDER_EN) | ||
196 | #define ISCSI_DATASEQ_INORDER_EN (1 << ISCSI_PARAM_DATASEQ_INORDER_EN) | ||
197 | #define ISCSI_ERL (1 << ISCSI_PARAM_ERL) | ||
198 | #define ISCSI_IFMARKER_EN (1 << ISCSI_PARAM_IFMARKER_EN) | ||
199 | #define ISCSI_OFMARKER_EN (1 << ISCSI_PARAM_OFMARKER_EN) | ||
200 | #define ISCSI_TARGET_NAME (1 << ISCSI_PARAM_TARGET_NAME) | ||
201 | #define ISCSI_TPGT (1 << ISCSI_PARAM_TPGT) | ||
202 | #define ISCSI_PERSISTENT_ADDRESS (1 << ISCSI_PARAM_PERSISTENT_ADDRESS) | ||
203 | #define ISCSI_PERSISTENT_PORT (1 << ISCSI_PARAM_PERSISTENT_PORT) | ||
204 | #define ISCSI_CONN_PORT (1 << ISCSI_PARAM_CONN_PORT) | ||
205 | #define ISCSI_CONN_ADDRESS (1 << ISCSI_PARAM_CONN_ADDRESS) | ||
174 | 206 | ||
175 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 207 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
176 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 208 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |