diff options
author | Manish Rangankar <manish.rangankar@qlogic.com> | 2011-07-25 14:48:52 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-08-27 10:36:23 -0400 |
commit | 17fa575eec7254fb089f858cae135d64cd015440 (patch) | |
tree | 42678af6a81a429bf38264d0879e6476abe7a71c /include/scsi/iscsi_if.h | |
parent | a355943ca847ca3a264d468e408217562234d019 (diff) |
[SCSI] scsi_transport_iscsi: Add conn login, kernel to user, event to support offload session login.
Offload drivers like qla4xxx will offload the sending of the login/logout
pdus still, so this patch adds iscsi_conn_login_event which is
used by these types of drivers to notify userspace that the connection
has changed state.
It also adds a iscsi_is_session_online helper so the lld
can query the sessions state field.
Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Lalit Chandivade <lalit.chandivade@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'include/scsi/iscsi_if.h')
-rw-r--r-- | include/scsi/iscsi_if.h | 17 |
1 files changed, 17 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 |