diff options
Diffstat (limited to 'include/scsi/libiscsi.h')
-rw-r--r-- | include/scsi/libiscsi.h | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index b4b31132618b..89429f433f85 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -57,11 +57,14 @@ struct iscsi_nopin; | |||
57 | #define ISCSI_MAX_CMD_PER_LUN 128 | 57 | #define ISCSI_MAX_CMD_PER_LUN 128 |
58 | 58 | ||
59 | /* Task Mgmt states */ | 59 | /* Task Mgmt states */ |
60 | #define TMABORT_INITIAL 0x0 | 60 | enum { |
61 | #define TMABORT_SUCCESS 0x1 | 61 | TMF_INITIAL, |
62 | #define TMABORT_FAILED 0x2 | 62 | TMF_QUEUED, |
63 | #define TMABORT_TIMEDOUT 0x3 | 63 | TMF_SUCCESS, |
64 | #define TMABORT_NOT_FOUND 0x4 | 64 | TMF_FAILED, |
65 | TMF_TIMEDOUT, | ||
66 | TMF_NOT_FOUND, | ||
67 | }; | ||
65 | 68 | ||
66 | /* Connection suspend "bit" */ | 69 | /* Connection suspend "bit" */ |
67 | #define ISCSI_SUSPEND_BIT 1 | 70 | #define ISCSI_SUSPEND_BIT 1 |
@@ -91,7 +94,6 @@ enum { | |||
91 | ISCSI_TASK_COMPLETED, | 94 | ISCSI_TASK_COMPLETED, |
92 | ISCSI_TASK_PENDING, | 95 | ISCSI_TASK_PENDING, |
93 | ISCSI_TASK_RUNNING, | 96 | ISCSI_TASK_RUNNING, |
94 | ISCSI_TASK_ABORTING, | ||
95 | }; | 97 | }; |
96 | 98 | ||
97 | struct iscsi_cmd_task { | 99 | struct iscsi_cmd_task { |
@@ -110,7 +112,6 @@ struct iscsi_cmd_task { | |||
110 | unsigned data_count; /* remaining Data-Out */ | 112 | unsigned data_count; /* remaining Data-Out */ |
111 | struct scsi_cmnd *sc; /* associated SCSI cmd*/ | 113 | struct scsi_cmnd *sc; /* associated SCSI cmd*/ |
112 | struct iscsi_conn *conn; /* used connection */ | 114 | struct iscsi_conn *conn; /* used connection */ |
113 | struct iscsi_mgmt_task *mtask; /* tmf mtask in progr */ | ||
114 | 115 | ||
115 | /* state set/tested under session->lock */ | 116 | /* state set/tested under session->lock */ |
116 | int state; | 117 | int state; |
@@ -152,10 +153,11 @@ struct iscsi_conn { | |||
152 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ | 153 | struct iscsi_cmd_task *ctask; /* xmit ctask in progress */ |
153 | 154 | ||
154 | /* xmit */ | 155 | /* xmit */ |
155 | struct kfifo *mgmtqueue; /* mgmt (control) xmit queue */ | 156 | struct list_head mgmtqueue; /* mgmt (control) xmit queue */ |
156 | struct list_head mgmt_run_list; /* list of control tasks */ | 157 | struct list_head mgmt_run_list; /* list of control tasks */ |
157 | struct list_head xmitqueue; /* data-path cmd queue */ | 158 | struct list_head xmitqueue; /* data-path cmd queue */ |
158 | struct list_head run_list; /* list of cmds in progress */ | 159 | struct list_head run_list; /* list of cmds in progress */ |
160 | struct list_head requeue; /* tasks needing another run */ | ||
159 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ | 161 | struct work_struct xmitwork; /* per-conn. xmit workqueue */ |
160 | unsigned long suspend_tx; /* suspend Tx */ | 162 | unsigned long suspend_tx; /* suspend Tx */ |
161 | unsigned long suspend_rx; /* suspend Rx */ | 163 | unsigned long suspend_rx; /* suspend Rx */ |
@@ -163,8 +165,8 @@ struct iscsi_conn { | |||
163 | /* abort */ | 165 | /* abort */ |
164 | wait_queue_head_t ehwait; /* used in eh_abort() */ | 166 | wait_queue_head_t ehwait; /* used in eh_abort() */ |
165 | struct iscsi_tm tmhdr; | 167 | struct iscsi_tm tmhdr; |
166 | struct timer_list tmabort_timer; | 168 | struct timer_list tmf_timer; |
167 | int tmabort_state; /* see TMABORT_INITIAL, etc.*/ | 169 | int tmf_state; /* see TMF_INITIAL, etc.*/ |
168 | 170 | ||
169 | /* negotiated params */ | 171 | /* negotiated params */ |
170 | unsigned max_recv_dlength; /* initiator_max_recv_dsl*/ | 172 | unsigned max_recv_dlength; /* initiator_max_recv_dsl*/ |
@@ -231,6 +233,7 @@ struct iscsi_session { | |||
231 | int pdu_inorder_en; | 233 | int pdu_inorder_en; |
232 | int dataseq_inorder_en; | 234 | int dataseq_inorder_en; |
233 | int erl; | 235 | int erl; |
236 | int fast_abort; | ||
234 | int tpgt; | 237 | int tpgt; |
235 | char *username; | 238 | char *username; |
236 | char *username_in; | 239 | char *username_in; |
@@ -268,6 +271,7 @@ struct iscsi_session { | |||
268 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth); | 271 | extern int iscsi_change_queue_depth(struct scsi_device *sdev, int depth); |
269 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); | 272 | extern int iscsi_eh_abort(struct scsi_cmnd *sc); |
270 | extern int iscsi_eh_host_reset(struct scsi_cmnd *sc); | 273 | extern int iscsi_eh_host_reset(struct scsi_cmnd *sc); |
274 | extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | ||
271 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 275 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, |
272 | void (*done)(struct scsi_cmnd *)); | 276 | void (*done)(struct scsi_cmnd *)); |
273 | 277 | ||
@@ -326,6 +330,7 @@ extern int __iscsi_complete_pdu(struct iscsi_conn *, struct iscsi_hdr *, | |||
326 | char *, int); | 330 | char *, int); |
327 | extern int iscsi_verify_itt(struct iscsi_conn *, struct iscsi_hdr *, | 331 | extern int iscsi_verify_itt(struct iscsi_conn *, struct iscsi_hdr *, |
328 | uint32_t *); | 332 | uint32_t *); |
333 | extern void iscsi_requeue_ctask(struct iscsi_cmd_task *ctask); | ||
329 | 334 | ||
330 | /* | 335 | /* |
331 | * generic helpers | 336 | * generic helpers |