diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/libiscsi.h | 19 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 4 |
2 files changed, 18 insertions, 5 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index ba2760802ded..41904f611d12 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -60,6 +60,7 @@ struct iscsi_nopin; | |||
60 | #define TMABORT_SUCCESS 0x1 | 60 | #define TMABORT_SUCCESS 0x1 |
61 | #define TMABORT_FAILED 0x2 | 61 | #define TMABORT_FAILED 0x2 |
62 | #define TMABORT_TIMEDOUT 0x3 | 62 | #define TMABORT_TIMEDOUT 0x3 |
63 | #define TMABORT_NOT_FOUND 0x4 | ||
63 | 64 | ||
64 | /* Connection suspend "bit" */ | 65 | /* Connection suspend "bit" */ |
65 | #define ISCSI_SUSPEND_BIT 1 | 66 | #define ISCSI_SUSPEND_BIT 1 |
@@ -83,6 +84,12 @@ struct iscsi_mgmt_task { | |||
83 | struct list_head running; | 84 | struct list_head running; |
84 | }; | 85 | }; |
85 | 86 | ||
87 | enum { | ||
88 | ISCSI_TASK_COMPLETED, | ||
89 | ISCSI_TASK_PENDING, | ||
90 | ISCSI_TASK_RUNNING, | ||
91 | }; | ||
92 | |||
86 | struct iscsi_cmd_task { | 93 | struct iscsi_cmd_task { |
87 | /* | 94 | /* |
88 | * Becuae LLDs allocate their hdr differently, this is a pointer to | 95 | * Becuae LLDs allocate their hdr differently, this is a pointer to |
@@ -101,6 +108,8 @@ struct iscsi_cmd_task { | |||
101 | struct iscsi_conn *conn; /* used connection */ | 108 | struct iscsi_conn *conn; /* used connection */ |
102 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ | 109 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ |
103 | 110 | ||
111 | /* state set/tested under session->lock */ | ||
112 | int state; | ||
104 | struct list_head running; /* running cmd list */ | 113 | struct list_head running; /* running cmd list */ |
105 | void *dd_data; /* driver/transport data */ | 114 | void *dd_data; /* driver/transport data */ |
106 | }; | 115 | }; |
@@ -126,6 +135,14 @@ struct iscsi_conn { | |||
126 | int id; /* CID */ | 135 | int id; /* CID */ |
127 | struct list_head item; /* maintains list of conns */ | 136 | struct list_head item; /* maintains list of conns */ |
128 | int c_stage; /* connection state */ | 137 | int c_stage; /* connection state */ |
138 | /* | ||
139 | * Preallocated buffer for pdus that have data but do not | ||
140 | * originate from scsi-ml. We never have two pdus using the | ||
141 | * buffer at the same time. It is only allocated to | ||
142 | * the default max recv size because the pdus we support | ||
143 | * should always fit in this buffer | ||
144 | */ | ||
145 | char *data; | ||
129 | struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ | 146 | struct iscsi_mgmt_task *login_mtask; /* mtask used for login/text */ |
130 | struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ | 147 | struct iscsi_mgmt_task *mtask; /* xmit mtask in progress */ |
131 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ | 148 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ |
@@ -134,7 +151,7 @@ struct iscsi_conn { | |||
134 | struct kfifo *immqueue; /* immediate xmit queue */ | 151 | struct kfifo *immqueue; /* immediate xmit queue */ |
135 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ | 152 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ |
136 | struct list_head mgmt_run_list; /* list of control tasks */ | 153 | struct list_head mgmt_run_list; /* list of control tasks */ |
137 | struct kfifo *xmitqueue; /* data-path cmd queue */ | 154 | struct list_head xmitqueue; /* data-path cmd queue */ |
138 | struct list_head run_list; /* list of cmds in progress */ | 155 | struct list_head run_list; /* list of cmds in progress */ |
139 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ | 156 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ |
140 | /* | 157 | /* |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 5a3df1d7085f..39e833260bd0 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -57,8 +57,6 @@ struct sockaddr; | |||
57 | * @stop_conn: suspend/recover/terminate connection | 57 | * @stop_conn: suspend/recover/terminate connection |
58 | * @send_pdu: send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text. | 58 | * @send_pdu: send iSCSI PDU, Login, Logout, NOP-Out, Reject, Text. |
59 | * @session_recovery_timedout: notify LLD a block during recovery timed out | 59 | * @session_recovery_timedout: notify LLD a block during recovery timed out |
60 | * @suspend_conn_recv: susepend the recv side of the connection | ||
61 | * @termincate_conn: destroy socket connection. Called with mutex lock. | ||
62 | * @init_cmd_task: Initialize a iscsi_cmd_task and any internal structs. | 60 | * @init_cmd_task: Initialize a iscsi_cmd_task and any internal structs. |
63 | * Called from queuecommand with session lock held. | 61 | * Called from queuecommand with session lock held. |
64 | * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. | 62 | * @init_mgmt_task: Initialize a iscsi_mgmt_task and any internal structs. |
@@ -112,8 +110,6 @@ struct iscsi_transport { | |||
112 | char *data, uint32_t data_size); | 110 | char *data, uint32_t data_size); |
113 | void (*get_stats) (struct iscsi_cls_conn *conn, | 111 | void (*get_stats) (struct iscsi_cls_conn *conn, |
114 | struct iscsi_stats *stats); | 112 | struct iscsi_stats *stats); |
115 | void (*suspend_conn_recv) (struct iscsi_conn *conn); | ||
116 | void (*terminate_conn) (struct iscsi_conn *conn); | ||
117 | void (*init_cmd_task) (struct iscsi_cmd_task *ctask); | 113 | void (*init_cmd_task) (struct iscsi_cmd_task *ctask); |
118 | void (*init_mgmt_task) (struct iscsi_conn *conn, | 114 | void (*init_mgmt_task) (struct iscsi_conn *conn, |
119 | struct iscsi_mgmt_task *mtask, | 115 | struct iscsi_mgmt_task *mtask, |