aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_transport_iscsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi_transport_iscsi.h')
-rw-r--r--include/scsi/scsi_transport_iscsi.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h
index 4b200645c84b..9d2b99159ee7 100644
--- a/include/scsi/scsi_transport_iscsi.h
+++ b/include/scsi/scsi_transport_iscsi.h
@@ -90,6 +90,7 @@ struct iscsi_transport {
90 char *data, uint32_t data_size); 90 char *data, uint32_t data_size);
91 void (*get_stats) (struct iscsi_cls_conn *conn, 91 void (*get_stats) (struct iscsi_cls_conn *conn,
92 struct iscsi_stats *stats); 92 struct iscsi_stats *stats);
93 void (*session_recovery_timedout) (struct iscsi_cls_session *session);
93}; 94};
94 95
95/* 96/*
@@ -130,12 +131,20 @@ struct iscsi_cls_conn {
130 131
131struct iscsi_cls_session { 132struct iscsi_cls_session {
132 struct list_head sess_list; /* item in session_list */ 133 struct list_head sess_list; /* item in session_list */
134 struct list_head host_list;
133 struct iscsi_transport *transport; 135 struct iscsi_transport *transport;
134 136
135 /* iSCSI values used as unique id by userspace. */ 137 /* iSCSI values used as unique id by userspace. */
136 char *targetname; 138 char *targetname;
137 int tpgt; 139 int tpgt;
138 140
141 /* recovery fields */
142 int recovery_tmo;
143 struct work_struct recovery_work;
144
145 int target_id;
146 int channel;
147
139 int sid; /* session id */ 148 int sid; /* session id */
140 void *dd_data; /* LLD private data */ 149 void *dd_data; /* LLD private data */
141 struct device dev; /* sysfs transport/container device */ 150 struct device dev; /* sysfs transport/container device */
@@ -147,15 +156,23 @@ struct iscsi_cls_session {
147#define iscsi_session_to_shost(_session) \ 156#define iscsi_session_to_shost(_session) \
148 dev_to_shost(_session->dev.parent) 157 dev_to_shost(_session->dev.parent)
149 158
159struct iscsi_host {
160 int next_target_id;
161 struct list_head sessions;
162 struct mutex mutex;
163};
164
150/* 165/*
151 * session and connection functions that can be used by HW iSCSI LLDs 166 * session and connection functions that can be used by HW iSCSI LLDs
152 */ 167 */
153extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost, 168extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost,
154 struct iscsi_transport *t); 169 struct iscsi_transport *t, int channel);
155extern int iscsi_destroy_session(struct iscsi_cls_session *session); 170extern int iscsi_destroy_session(struct iscsi_cls_session *session);
156extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess, 171extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess,
157 uint32_t cid); 172 uint32_t cid);
158extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn); 173extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn);
174extern void iscsi_unblock_session(struct iscsi_cls_session *session);
175extern void iscsi_block_session(struct iscsi_cls_session *session);
159 176
160/* 177/*
161 * session functions used by software iscsi 178 * session functions used by software iscsi