aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libiscsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/libiscsi.h')
-rw-r--r--include/scsi/libiscsi.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 7360e1916e75..0289f5745fb9 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -36,6 +36,7 @@ struct scsi_transport_template;
36struct scsi_host_template; 36struct scsi_host_template;
37struct scsi_device; 37struct scsi_device;
38struct Scsi_Host; 38struct Scsi_Host;
39struct scsi_target;
39struct scsi_cmnd; 40struct scsi_cmnd;
40struct socket; 41struct socket;
41struct iscsi_transport; 42struct iscsi_transport;
@@ -45,18 +46,10 @@ struct iscsi_session;
45struct iscsi_nopin; 46struct iscsi_nopin;
46struct device; 47struct device;
47 48
48/* #define DEBUG_SCSI */
49#ifdef DEBUG_SCSI
50#define debug_scsi(fmt...) printk(KERN_INFO "iscsi: " fmt)
51#else
52#define debug_scsi(fmt...)
53#endif
54
55#define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */ 49#define ISCSI_DEF_XMIT_CMDS_MAX 128 /* must be power of 2 */
56#define ISCSI_MGMT_CMDS_MAX 15 50#define ISCSI_MGMT_CMDS_MAX 15
57 51
58#define ISCSI_DEF_CMD_PER_LUN 32 52#define ISCSI_DEF_CMD_PER_LUN 32
59#define ISCSI_MAX_CMD_PER_LUN 128
60 53
61/* Task Mgmt states */ 54/* Task Mgmt states */
62enum { 55enum {
@@ -326,6 +319,9 @@ struct iscsi_host {
326 spinlock_t lock; 319 spinlock_t lock;
327 int num_sessions; 320 int num_sessions;
328 int state; 321 int state;
322
323 struct workqueue_struct *workq;
324 char workq_name[20];
329}; 325};
330 326
331/* 327/*
@@ -351,9 +347,11 @@ extern int iscsi_host_get_param(struct Scsi_Host *shost,
351 enum iscsi_host_param param, char *buf); 347 enum iscsi_host_param param, char *buf);
352extern int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev); 348extern int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev);
353extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht, 349extern struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
354 int dd_data_size, uint16_t qdepth); 350 int dd_data_size,
351 bool xmit_can_sleep);
355extern void iscsi_host_remove(struct Scsi_Host *shost); 352extern void iscsi_host_remove(struct Scsi_Host *shost);
356extern void iscsi_host_free(struct Scsi_Host *shost); 353extern void iscsi_host_free(struct Scsi_Host *shost);
354extern int iscsi_target_alloc(struct scsi_target *starget);
357 355
358/* 356/*
359 * session management 357 * session management
@@ -382,11 +380,12 @@ extern void iscsi_conn_stop(struct iscsi_cls_conn *, int);
382extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *, 380extern int iscsi_conn_bind(struct iscsi_cls_session *, struct iscsi_cls_conn *,
383 int); 381 int);
384extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err); 382extern void iscsi_conn_failure(struct iscsi_conn *conn, enum iscsi_err err);
385extern void iscsi_session_failure(struct iscsi_cls_session *cls_session, 383extern void iscsi_session_failure(struct iscsi_session *session,
386 enum iscsi_err err); 384 enum iscsi_err err);
387extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn, 385extern int iscsi_conn_get_param(struct iscsi_cls_conn *cls_conn,
388 enum iscsi_param param, char *buf); 386 enum iscsi_param param, char *buf);
389extern void iscsi_suspend_tx(struct iscsi_conn *conn); 387extern void iscsi_suspend_tx(struct iscsi_conn *conn);
388extern void iscsi_conn_queue_work(struct iscsi_conn *conn);
390 389
391#define iscsi_conn_printk(prefix, _c, fmt, a...) \ 390#define iscsi_conn_printk(prefix, _c, fmt, a...) \
392 iscsi_cls_conn_printk(prefix, ((struct iscsi_conn *)_c)->cls_conn, \ 391 iscsi_cls_conn_printk(prefix, ((struct iscsi_conn *)_c)->cls_conn, \