diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/iscsi_if.h | 17 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index d3f256a232f8..629ca42dfe75 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -71,6 +71,7 @@ enum iscsi_uevent_e { | |||
71 | 71 | ||
72 | ISCSI_KEVENT_PATH_REQ = KEVENT_BASE + 7, | 72 | ISCSI_KEVENT_PATH_REQ = KEVENT_BASE + 7, |
73 | ISCSI_KEVENT_IF_DOWN = KEVENT_BASE + 8, | 73 | ISCSI_KEVENT_IF_DOWN = KEVENT_BASE + 8, |
74 | ISCSI_KEVENT_CONN_LOGIN_STATE = KEVENT_BASE + 9, | ||
74 | }; | 75 | }; |
75 | 76 | ||
76 | enum iscsi_tgt_dscvr { | 77 | enum iscsi_tgt_dscvr { |
@@ -198,6 +199,11 @@ struct iscsi_uevent { | |||
198 | uint32_t cid; | 199 | uint32_t cid; |
199 | uint64_t recv_handle; | 200 | uint64_t recv_handle; |
200 | } recv_req; | 201 | } recv_req; |
202 | struct msg_conn_login { | ||
203 | uint32_t sid; | ||
204 | uint32_t cid; | ||
205 | uint32_t state; /* enum iscsi_conn_state */ | ||
206 | } conn_login; | ||
201 | struct msg_conn_error { | 207 | struct msg_conn_error { |
202 | uint32_t sid; | 208 | uint32_t sid; |
203 | uint32_t cid; | 209 | uint32_t cid; |
@@ -309,6 +315,16 @@ enum iscsi_net_param { | |||
309 | ISCSI_NET_PARAM_IFACE_NAME = 17, | 315 | ISCSI_NET_PARAM_IFACE_NAME = 17, |
310 | }; | 316 | }; |
311 | 317 | ||
318 | enum iscsi_conn_state { | ||
319 | ISCSI_CONN_STATE_FREE, | ||
320 | ISCSI_CONN_STATE_XPT_WAIT, | ||
321 | ISCSI_CONN_STATE_IN_LOGIN, | ||
322 | ISCSI_CONN_STATE_LOGGED_IN, | ||
323 | ISCSI_CONN_STATE_IN_LOGOUT, | ||
324 | ISCSI_CONN_STATE_LOGOUT_REQUESTED, | ||
325 | ISCSI_CONN_STATE_CLEANUP_WAIT, | ||
326 | }; | ||
327 | |||
312 | /* | 328 | /* |
313 | * Common error codes | 329 | * Common error codes |
314 | */ | 330 | */ |
@@ -421,6 +437,7 @@ enum iscsi_host_param { | |||
421 | #define CAP_DIGEST_OFFLOAD 0x1000 /* offload hdr and data digests */ | 437 | #define CAP_DIGEST_OFFLOAD 0x1000 /* offload hdr and data digests */ |
422 | #define CAP_PADDING_OFFLOAD 0x2000 /* offload padding insertion, removal, | 438 | #define CAP_PADDING_OFFLOAD 0x2000 /* offload padding insertion, removal, |
423 | and verification */ | 439 | and verification */ |
440 | #define CAP_LOGIN_OFFLOAD 0x4000 /* offload session login */ | ||
424 | 441 | ||
425 | /* | 442 | /* |
426 | * These flags describes reason of stop_conn() call | 443 | * These flags describes reason of stop_conn() call |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 4a3edeeae8f6..3389cd5ea94c 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -156,6 +156,8 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt); | |||
156 | */ | 156 | */ |
157 | extern void iscsi_conn_error_event(struct iscsi_cls_conn *conn, | 157 | extern void iscsi_conn_error_event(struct iscsi_cls_conn *conn, |
158 | enum iscsi_err error); | 158 | enum iscsi_err error); |
159 | extern void iscsi_conn_login_event(struct iscsi_cls_conn *conn, | ||
160 | enum iscsi_conn_state state); | ||
159 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, | 161 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
160 | char *data, uint32_t data_size); | 162 | char *data, uint32_t data_size); |
161 | 163 | ||
@@ -268,6 +270,7 @@ struct iscsi_iface { | |||
268 | dev_printk(prefix, &(_cls_conn)->dev, fmt, ##a) | 270 | dev_printk(prefix, &(_cls_conn)->dev, fmt, ##a) |
269 | 271 | ||
270 | extern int iscsi_session_chkready(struct iscsi_cls_session *session); | 272 | extern int iscsi_session_chkready(struct iscsi_cls_session *session); |
273 | extern int iscsi_is_session_online(struct iscsi_cls_session *session); | ||
271 | extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, | 274 | extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, |
272 | struct iscsi_transport *transport, int dd_size); | 275 | struct iscsi_transport *transport, int dd_size); |
273 | extern int iscsi_add_session(struct iscsi_cls_session *session, | 276 | extern int iscsi_add_session(struct iscsi_cls_session *session, |