summaryrefslogtreecommitdiffstats
path: root/include/scsi/libiscsi.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2006-06-28 12:00:23 -0500
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-06-29 11:07:14 -0400
commita54a52caad4bd6166cb7fa64e4e93031fa2fda5d (patch)
tree728672fae35fd344619129e78213043dabacf099 /include/scsi/libiscsi.h
parent01cb225dad8da2e717356fab03240e2f4a8d01bf (diff)
downloadop-kernel-dev-a54a52caad4bd6166cb7fa64e4e93031fa2fda5d.zip
op-kernel-dev-a54a52caad4bd6166cb7fa64e4e93031fa2fda5d.tar.gz
[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.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index cbf7e58..ba27608 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -157,6 +157,11 @@ struct iscsi_conn {
int max_xmit_dlength; /* target_max_recv_dsl */
int hdrdgst_en;
int datadgst_en;
+ int ifmarker_en;
+ int ofmarker_en;
+ /* values userspace uses to id a conn */
+ int persistent_port;
+ char *persistent_address;
/* MIB-statistics */
uint64_t txdata_octets;
@@ -196,8 +201,8 @@ struct iscsi_session {
int pdu_inorder_en;
int dataseq_inorder_en;
int erl;
- int ifmarker_en;
- int ofmarker_en;
+ int tpgt;
+ char *targetname;
/* control data */
struct iscsi_transport *tt;
@@ -240,6 +245,10 @@ iscsi_session_setup(struct iscsi_transport *, struct scsi_transport_template *,
extern void iscsi_session_teardown(struct iscsi_cls_session *);
extern struct iscsi_session *class_to_transport_session(struct iscsi_cls_session *);
extern void iscsi_session_recovery_timedout(struct iscsi_cls_session *);
+extern int iscsi_set_param(struct iscsi_cls_conn *cls_conn,
+ enum iscsi_param param, char *buf, int buflen);
+extern int iscsi_session_get_param(struct iscsi_cls_session *cls_session,
+ enum iscsi_param param, char *buf);
#define session_to_cls(_sess) \
hostdata_session(_sess->host->hostdata)
@@ -255,6 +264,8 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int);
extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *,
int);
extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
+extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
+ enum iscsi_param param, char *buf);
/*
* pdu and task processing
OpenPOWER on IntegriCloud