diff options
Diffstat (limited to 'include/scsi/iscsi_if.h')
-rw-r--r-- | include/scsi/iscsi_if.h | 93 |
1 files changed, 50 insertions, 43 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index e19e58423166..16be12f1cbe8 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -50,6 +50,7 @@ enum iscsi_uevent_e { | |||
50 | ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, | 50 | ISCSI_UEVENT_TGT_DSCVR = UEVENT_BASE + 15, |
51 | ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16, | 51 | ISCSI_UEVENT_SET_HOST_PARAM = UEVENT_BASE + 16, |
52 | ISCSI_UEVENT_UNBIND_SESSION = UEVENT_BASE + 17, | 52 | ISCSI_UEVENT_UNBIND_SESSION = UEVENT_BASE + 17, |
53 | ISCSI_UEVENT_CREATE_BOUND_SESSION = UEVENT_BASE + 18, | ||
53 | 54 | ||
54 | /* up events */ | 55 | /* up events */ |
55 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, | 56 | ISCSI_KEVENT_RECV_PDU = KEVENT_BASE + 1, |
@@ -78,6 +79,12 @@ struct iscsi_uevent { | |||
78 | uint16_t cmds_max; | 79 | uint16_t cmds_max; |
79 | uint16_t queue_depth; | 80 | uint16_t queue_depth; |
80 | } c_session; | 81 | } c_session; |
82 | struct msg_create_bound_session { | ||
83 | uint64_t ep_handle; | ||
84 | uint32_t initial_cmdsn; | ||
85 | uint16_t cmds_max; | ||
86 | uint16_t queue_depth; | ||
87 | } c_bound_session; | ||
81 | struct msg_destroy_session { | 88 | struct msg_destroy_session { |
82 | uint32_t sid; | 89 | uint32_t sid; |
83 | } d_session; | 90 | } d_session; |
@@ -250,42 +257,49 @@ enum iscsi_param { | |||
250 | 257 | ||
251 | ISCSI_PARAM_PING_TMO, | 258 | ISCSI_PARAM_PING_TMO, |
252 | ISCSI_PARAM_RECV_TMO, | 259 | ISCSI_PARAM_RECV_TMO, |
260 | |||
261 | ISCSI_PARAM_IFACE_NAME, | ||
262 | ISCSI_PARAM_ISID, | ||
263 | ISCSI_PARAM_INITIATOR_NAME, | ||
253 | /* must always be last */ | 264 | /* must always be last */ |
254 | ISCSI_PARAM_MAX, | 265 | ISCSI_PARAM_MAX, |
255 | }; | 266 | }; |
256 | 267 | ||
257 | #define ISCSI_MAX_RECV_DLENGTH (1 << ISCSI_PARAM_MAX_RECV_DLENGTH) | 268 | #define ISCSI_MAX_RECV_DLENGTH (1ULL << ISCSI_PARAM_MAX_RECV_DLENGTH) |
258 | #define ISCSI_MAX_XMIT_DLENGTH (1 << ISCSI_PARAM_MAX_XMIT_DLENGTH) | 269 | #define ISCSI_MAX_XMIT_DLENGTH (1ULL << ISCSI_PARAM_MAX_XMIT_DLENGTH) |
259 | #define ISCSI_HDRDGST_EN (1 << ISCSI_PARAM_HDRDGST_EN) | 270 | #define ISCSI_HDRDGST_EN (1ULL << ISCSI_PARAM_HDRDGST_EN) |
260 | #define ISCSI_DATADGST_EN (1 << ISCSI_PARAM_DATADGST_EN) | 271 | #define ISCSI_DATADGST_EN (1ULL << ISCSI_PARAM_DATADGST_EN) |
261 | #define ISCSI_INITIAL_R2T_EN (1 << ISCSI_PARAM_INITIAL_R2T_EN) | 272 | #define ISCSI_INITIAL_R2T_EN (1ULL << ISCSI_PARAM_INITIAL_R2T_EN) |
262 | #define ISCSI_MAX_R2T (1 << ISCSI_PARAM_MAX_R2T) | 273 | #define ISCSI_MAX_R2T (1ULL << ISCSI_PARAM_MAX_R2T) |
263 | #define ISCSI_IMM_DATA_EN (1 << ISCSI_PARAM_IMM_DATA_EN) | 274 | #define ISCSI_IMM_DATA_EN (1ULL << ISCSI_PARAM_IMM_DATA_EN) |
264 | #define ISCSI_FIRST_BURST (1 << ISCSI_PARAM_FIRST_BURST) | 275 | #define ISCSI_FIRST_BURST (1ULL << ISCSI_PARAM_FIRST_BURST) |
265 | #define ISCSI_MAX_BURST (1 << ISCSI_PARAM_MAX_BURST) | 276 | #define ISCSI_MAX_BURST (1ULL << ISCSI_PARAM_MAX_BURST) |
266 | #define ISCSI_PDU_INORDER_EN (1 << ISCSI_PARAM_PDU_INORDER_EN) | 277 | #define ISCSI_PDU_INORDER_EN (1ULL << ISCSI_PARAM_PDU_INORDER_EN) |
267 | #define ISCSI_DATASEQ_INORDER_EN (1 << ISCSI_PARAM_DATASEQ_INORDER_EN) | 278 | #define ISCSI_DATASEQ_INORDER_EN (1ULL << ISCSI_PARAM_DATASEQ_INORDER_EN) |
268 | #define ISCSI_ERL (1 << ISCSI_PARAM_ERL) | 279 | #define ISCSI_ERL (1ULL << ISCSI_PARAM_ERL) |
269 | #define ISCSI_IFMARKER_EN (1 << ISCSI_PARAM_IFMARKER_EN) | 280 | #define ISCSI_IFMARKER_EN (1ULL << ISCSI_PARAM_IFMARKER_EN) |
270 | #define ISCSI_OFMARKER_EN (1 << ISCSI_PARAM_OFMARKER_EN) | 281 | #define ISCSI_OFMARKER_EN (1ULL << ISCSI_PARAM_OFMARKER_EN) |
271 | #define ISCSI_EXP_STATSN (1 << ISCSI_PARAM_EXP_STATSN) | 282 | #define ISCSI_EXP_STATSN (1ULL << ISCSI_PARAM_EXP_STATSN) |
272 | #define ISCSI_TARGET_NAME (1 << ISCSI_PARAM_TARGET_NAME) | 283 | #define ISCSI_TARGET_NAME (1ULL << ISCSI_PARAM_TARGET_NAME) |
273 | #define ISCSI_TPGT (1 << ISCSI_PARAM_TPGT) | 284 | #define ISCSI_TPGT (1ULL << ISCSI_PARAM_TPGT) |
274 | #define ISCSI_PERSISTENT_ADDRESS (1 << ISCSI_PARAM_PERSISTENT_ADDRESS) | 285 | #define ISCSI_PERSISTENT_ADDRESS (1ULL << ISCSI_PARAM_PERSISTENT_ADDRESS) |
275 | #define ISCSI_PERSISTENT_PORT (1 << ISCSI_PARAM_PERSISTENT_PORT) | 286 | #define ISCSI_PERSISTENT_PORT (1ULL << ISCSI_PARAM_PERSISTENT_PORT) |
276 | #define ISCSI_SESS_RECOVERY_TMO (1 << ISCSI_PARAM_SESS_RECOVERY_TMO) | 287 | #define ISCSI_SESS_RECOVERY_TMO (1ULL << ISCSI_PARAM_SESS_RECOVERY_TMO) |
277 | #define ISCSI_CONN_PORT (1 << ISCSI_PARAM_CONN_PORT) | 288 | #define ISCSI_CONN_PORT (1ULL << ISCSI_PARAM_CONN_PORT) |
278 | #define ISCSI_CONN_ADDRESS (1 << ISCSI_PARAM_CONN_ADDRESS) | 289 | #define ISCSI_CONN_ADDRESS (1ULL << ISCSI_PARAM_CONN_ADDRESS) |
279 | #define ISCSI_USERNAME (1 << ISCSI_PARAM_USERNAME) | 290 | #define ISCSI_USERNAME (1ULL << ISCSI_PARAM_USERNAME) |
280 | #define ISCSI_USERNAME_IN (1 << ISCSI_PARAM_USERNAME_IN) | 291 | #define ISCSI_USERNAME_IN (1ULL << ISCSI_PARAM_USERNAME_IN) |
281 | #define ISCSI_PASSWORD (1 << ISCSI_PARAM_PASSWORD) | 292 | #define ISCSI_PASSWORD (1ULL << ISCSI_PARAM_PASSWORD) |
282 | #define ISCSI_PASSWORD_IN (1 << ISCSI_PARAM_PASSWORD_IN) | 293 | #define ISCSI_PASSWORD_IN (1ULL << ISCSI_PARAM_PASSWORD_IN) |
283 | #define ISCSI_FAST_ABORT (1 << ISCSI_PARAM_FAST_ABORT) | 294 | #define ISCSI_FAST_ABORT (1ULL << ISCSI_PARAM_FAST_ABORT) |
284 | #define ISCSI_ABORT_TMO (1 << ISCSI_PARAM_ABORT_TMO) | 295 | #define ISCSI_ABORT_TMO (1ULL << ISCSI_PARAM_ABORT_TMO) |
285 | #define ISCSI_LU_RESET_TMO (1 << ISCSI_PARAM_LU_RESET_TMO) | 296 | #define ISCSI_LU_RESET_TMO (1ULL << ISCSI_PARAM_LU_RESET_TMO) |
286 | #define ISCSI_HOST_RESET_TMO (1 << ISCSI_PARAM_HOST_RESET_TMO) | 297 | #define ISCSI_HOST_RESET_TMO (1ULL << ISCSI_PARAM_HOST_RESET_TMO) |
287 | #define ISCSI_PING_TMO (1 << ISCSI_PARAM_PING_TMO) | 298 | #define ISCSI_PING_TMO (1ULL << ISCSI_PARAM_PING_TMO) |
288 | #define ISCSI_RECV_TMO (1 << ISCSI_PARAM_RECV_TMO) | 299 | #define ISCSI_RECV_TMO (1ULL << ISCSI_PARAM_RECV_TMO) |
300 | #define ISCSI_IFACE_NAME (1ULL << ISCSI_PARAM_IFACE_NAME) | ||
301 | #define ISCSI_ISID (1ULL << ISCSI_PARAM_ISID) | ||
302 | #define ISCSI_INITIATOR_NAME (1ULL << ISCSI_PARAM_INITIATOR_NAME) | ||
289 | 303 | ||
290 | /* iSCSI HBA params */ | 304 | /* iSCSI HBA params */ |
291 | enum iscsi_host_param { | 305 | enum iscsi_host_param { |
@@ -296,20 +310,13 @@ enum iscsi_host_param { | |||
296 | ISCSI_HOST_PARAM_MAX, | 310 | ISCSI_HOST_PARAM_MAX, |
297 | }; | 311 | }; |
298 | 312 | ||
299 | #define ISCSI_HOST_HWADDRESS (1 << ISCSI_HOST_PARAM_HWADDRESS) | 313 | #define ISCSI_HOST_HWADDRESS (1ULL << ISCSI_HOST_PARAM_HWADDRESS) |
300 | #define ISCSI_HOST_INITIATOR_NAME (1 << ISCSI_HOST_PARAM_INITIATOR_NAME) | 314 | #define ISCSI_HOST_INITIATOR_NAME (1ULL << ISCSI_HOST_PARAM_INITIATOR_NAME) |
301 | #define ISCSI_HOST_NETDEV_NAME (1 << ISCSI_HOST_PARAM_NETDEV_NAME) | 315 | #define ISCSI_HOST_NETDEV_NAME (1ULL << ISCSI_HOST_PARAM_NETDEV_NAME) |
302 | #define ISCSI_HOST_IPADDRESS (1 << ISCSI_HOST_PARAM_IPADDRESS) | 316 | #define ISCSI_HOST_IPADDRESS (1ULL << ISCSI_HOST_PARAM_IPADDRESS) |
303 | 317 | ||
304 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 318 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
305 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 319 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |
306 | #define hostdata_session(_hostdata) (iscsi_ptr(*(unsigned long *)_hostdata)) | ||
307 | |||
308 | /** | ||
309 | * iscsi_hostdata - get LLD hostdata from scsi_host | ||
310 | * @_hostdata: pointer to scsi host's hostdata | ||
311 | **/ | ||
312 | #define iscsi_hostdata(_hostdata) ((void*)_hostdata + sizeof(unsigned long)) | ||
313 | 320 | ||
314 | /* | 321 | /* |
315 | * These flags presents iSCSI Data-Path capabilities. | 322 | * These flags presents iSCSI Data-Path capabilities. |