diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2006-06-28 13:00:23 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-06-29 11:07:14 -0400 |
commit | a54a52caad4bd6166cb7fa64e4e93031fa2fda5d (patch) | |
tree | 728672fae35fd344619129e78213043dabacf099 /include/scsi/libiscsi.h | |
parent | 01cb225dad8da2e717356fab03240e2f4a8d01bf (diff) |
[SCSI] iscsi: fixup set/get param functions
Reduce duplication in the software iscsi_transport modules by
adding a libiscsi function to handle the common grunt work.
This also has the drivers return specifc -EXXX values for different
errors so userspace can finally handle them in a sane way.
Also just pass the sysfs buffers to the drivers so HW iscsi can
get/set its string values, like targetname, and initiatorname.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/libiscsi.h')
-rw-r--r-- | include/scsi/libiscsi.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index cbf7e58bd6f9..ba2760802ded 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -157,6 +157,11 @@ struct iscsi_conn { | |||
157 | int max_xmit_dlength; /* target_max_recv_dsl */ | 157 | int max_xmit_dlength; /* target_max_recv_dsl */ |
158 | int hdrdgst_en; | 158 | int hdrdgst_en; |
159 | int datadgst_en; | 159 | int datadgst_en; |
160 | int ifmarker_en; | ||
161 | int ofmarker_en; | ||
162 | /* values userspace uses to id a conn */ | ||
163 | int persistent_port; | ||
164 | char *persistent_address; | ||
160 | 165 | ||
161 | /* MIB-statistics */ | 166 | /* MIB-statistics */ |
162 | uint64_t txdata_octets; | 167 | uint64_t txdata_octets; |
@@ -196,8 +201,8 @@ struct iscsi_session { | |||
196 | int pdu_inorder_en; | 201 | int pdu_inorder_en; |
197 | int dataseq_inorder_en; | 202 | int dataseq_inorder_en; |
198 | int erl; | 203 | int erl; |
199 | int ifmarker_en; | 204 | int tpgt; |
200 | int ofmarker_en; | 205 | char *targetname; |
201 | 206 | ||
202 | /* control data */ | 207 | /* control data */ |
203 | struct iscsi_transport *tt; | 208 | struct iscsi_transport *tt; |
@@ -240,6 +245,10 @@ iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *, | |||
240 | extern void iscsi_session_teardown(struct iscsi_cls_session *); | 245 | extern void iscsi_session_teardown(struct iscsi_cls_session *); |
241 | extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); | 246 | extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *); |
242 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); | 247 | extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *); |
248 | extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn, | ||
249 | enum iscsi_param param, char *buf, int buflen); | ||
250 | extern int iscsi_session_get_param(struct iscsi_cls_session *cls_session, | ||
251 | enum iscsi_param param, char *buf); | ||
243 | 252 | ||
244 | #define session_to_cls(_sess) \ | 253 | #define session_to_cls(_sess) \ |
245 | hostdata_session(_sess->host->hostdata) | 254 | hostdata_session(_sess->host->hostdata) |
@@ -255,6 +264,8 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); | |||
255 | extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, | 264 | extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, |
256 | int); | 265 | int); |
257 | extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); | 266 | extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); |
267 | extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | ||
268 | enum iscsi_param param, char *buf); | ||
258 | 269 | ||
259 | /* | 270 | /* |
260 | * pdu and task processing | 271 | * pdu and task processing |