diff options
Diffstat (limited to 'include/scsi/libiscsi.h')
| -rw-r--r-- | include/scsi/libiscsi.h | 19 |
1 files changed, 18 insertions, 1 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 | /* |
