diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-08-27 22:59:59 -0400 |
commit | 8ce7a9c159c8c4eb480f0a65c6af753dbf9a1a70 (patch) | |
tree | be59573c0af3617d0cd8a7d61f0ed119e58b1156 /include/scsi/libiscsi.h | |
parent | d2afb3ae04e36dbc6e9eb2d8bd54406ff7b6b3bd (diff) | |
parent | 01da5fd83d6b2c5e36b77539f6cbdd8f49849225 (diff) |
Merge ../linux-2.6
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 | /* |