diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/iscsi_if.h | 1 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 13 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 3 |
3 files changed, 16 insertions, 1 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 16be12f1cbe8..f274d248a91f 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -213,6 +213,7 @@ enum iscsi_err { | |||
213 | ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15, | 213 | ISCSI_ERR_DATA_DGST = ISCSI_ERR_BASE + 15, |
214 | ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16, | 214 | ISCSI_ERR_PARAM_NOT_FOUND = ISCSI_ERR_BASE + 16, |
215 | ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17, | 215 | ISCSI_ERR_NO_SCSI_CMD = ISCSI_ERR_BASE + 17, |
216 | ISCSI_ERR_INVALID_HOST = ISCSI_ERR_BASE + 18, | ||
216 | }; | 217 | }; |
217 | 218 | ||
218 | /* | 219 | /* |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 5e75bb7f311c..7d8cd159f592 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -287,6 +287,11 @@ struct iscsi_session { | |||
287 | struct iscsi_pool cmdpool; /* PDU's pool */ | 287 | struct iscsi_pool cmdpool; /* PDU's pool */ |
288 | }; | 288 | }; |
289 | 289 | ||
290 | enum { | ||
291 | ISCSI_HOST_SETUP, | ||
292 | ISCSI_HOST_REMOVED, | ||
293 | }; | ||
294 | |||
290 | struct iscsi_host { | 295 | struct iscsi_host { |
291 | char *initiatorname; | 296 | char *initiatorname; |
292 | /* hw address or netdev iscsi connection is bound to */ | 297 | /* hw address or netdev iscsi connection is bound to */ |
@@ -295,6 +300,12 @@ struct iscsi_host { | |||
295 | /* local address */ | 300 | /* local address */ |
296 | int local_port; | 301 | int local_port; |
297 | char local_address[ISCSI_ADDRESS_BUF_LEN]; | 302 | char local_address[ISCSI_ADDRESS_BUF_LEN]; |
303 | |||
304 | wait_queue_head_t session_removal_wq; | ||
305 | /* protects sessions and state */ | ||
306 | spinlock_t lock; | ||
307 | int num_sessions; | ||
308 | int state; | ||
298 | }; | 309 | }; |
299 | 310 | ||
300 | /* | 311 | /* |
@@ -351,6 +362,8 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); | |||
351 | extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, | 362 | extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, |
352 | int); | 363 | int); |
353 | extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); | 364 | extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); |
365 | extern void iscsi_session_failure(struct iscsi_cls_session *cls_session, | ||
366 | enum iscsi_err err); | ||
354 | extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, | 367 | extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, |
355 | enum iscsi_param param, char *buf); | 368 | enum iscsi_param param, char *buf); |
356 | extern void iscsi_suspend_tx(struct iscsi_conn *conn); | 369 | extern void iscsi_suspend_tx(struct iscsi_conn *conn); |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 8b6c91df4c7a..8749d4d8e244 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -135,7 +135,8 @@ extern int iscsi_unregister_transport(struct iscsi_transport *tt); | |||
135 | /* | 135 | /* |
136 | * control plane upcalls | 136 | * control plane upcalls |
137 | */ | 137 | */ |
138 | extern void iscsi_conn_error(struct iscsi_cls_conn *conn, enum iscsi_err error); | 138 | extern void iscsi_conn_error_event(struct iscsi_cls_conn *conn, |
139 | enum iscsi_err error); | ||
139 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, | 140 | extern int iscsi_recv_pdu(struct iscsi_cls_conn *conn, struct iscsi_hdr *hdr, |
140 | char *data, uint32_t data_size); | 141 | char *data, uint32_t data_size); |
141 | 142 | ||