aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/iscsi_if.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-05-21 16:54:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-07-12 09:22:21 -0400
commit88dfd340b9dece8fcaa1a2d4c782338926c017f7 (patch)
tree89800910ef8636f00d2c66ce4e83a161087857e6 /include/scsi/iscsi_if.h
parent06520edea0fc7007985fa4cd51560149feb3f442 (diff)
[SCSI] iscsi class: Add session initiatorname and ifacename sysfs attrs.
This adds two new attrs used for creating initiator ports and binding sessions to hardware. The session level initiatorname: Since bnx2i does a scsi_host per host device, we need to add the iface initiator port settings on the session, so we can create multiple initiator ports (each with different inames) per device/scsi_host. The current iname reflects that qla4xxx can have one iname per hba, and we are allocating a host per session for software. The iname on the host will remain so we can export and set the hba level qla4xxx setting. The ifacename attr: To bind a session to a some peice of hardware in userspace we maintain some mappings, but during boot or iscsid restart (iscsid contains the user space part of the driver) we need to be able to figure out which of those host mappings abstractions maps to certain sessions. This patch adds a ifacename attr, which userspace can set to id the host side of the endpoint across pivot_roots and iscsid restarts. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi/iscsi_if.h')
-rw-r--r--include/scsi/iscsi_if.h79
1 files changed, 43 insertions, 36 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h
index a0f13a280e71..16be12f1cbe8 100644
--- a/include/scsi/iscsi_if.h
+++ b/include/scsi/iscsi_if.h
@@ -257,42 +257,49 @@ enum iscsi_param {
257 257
258 ISCSI_PARAM_PING_TMO, 258 ISCSI_PARAM_PING_TMO,
259 ISCSI_PARAM_RECV_TMO, 259 ISCSI_PARAM_RECV_TMO,
260
261 ISCSI_PARAM_IFACE_NAME,
262 ISCSI_PARAM_ISID,
263 ISCSI_PARAM_INITIATOR_NAME,
260 /* must always be last */ 264 /* must always be last */
261 ISCSI_PARAM_MAX, 265 ISCSI_PARAM_MAX,
262}; 266};
263 267
264#define ISCSI_MAX_RECV_DLENGTH (1 << ISCSI_PARAM_MAX_RECV_DLENGTH) 268#define ISCSI_MAX_RECV_DLENGTH (1ULL << ISCSI_PARAM_MAX_RECV_DLENGTH)
265#define ISCSI_MAX_XMIT_DLENGTH (1 << ISCSI_PARAM_MAX_XMIT_DLENGTH) 269#define ISCSI_MAX_XMIT_DLENGTH (1ULL << ISCSI_PARAM_MAX_XMIT_DLENGTH)
266#define ISCSI_HDRDGST_EN (1 << ISCSI_PARAM_HDRDGST_EN) 270#define ISCSI_HDRDGST_EN (1ULL << ISCSI_PARAM_HDRDGST_EN)
267#define ISCSI_DATADGST_EN (1 << ISCSI_PARAM_DATADGST_EN) 271#define ISCSI_DATADGST_EN (1ULL << ISCSI_PARAM_DATADGST_EN)
268#define ISCSI_INITIAL_R2T_EN (1 << ISCSI_PARAM_INITIAL_R2T_EN) 272#define ISCSI_INITIAL_R2T_EN (1ULL << ISCSI_PARAM_INITIAL_R2T_EN)
269#define ISCSI_MAX_R2T (1 << ISCSI_PARAM_MAX_R2T) 273#define ISCSI_MAX_R2T (1ULL << ISCSI_PARAM_MAX_R2T)
270#define ISCSI_IMM_DATA_EN (1 << ISCSI_PARAM_IMM_DATA_EN) 274#define ISCSI_IMM_DATA_EN (1ULL << ISCSI_PARAM_IMM_DATA_EN)
271#define ISCSI_FIRST_BURST (1 << ISCSI_PARAM_FIRST_BURST) 275#define ISCSI_FIRST_BURST (1ULL << ISCSI_PARAM_FIRST_BURST)
272#define ISCSI_MAX_BURST (1 << ISCSI_PARAM_MAX_BURST) 276#define ISCSI_MAX_BURST (1ULL << ISCSI_PARAM_MAX_BURST)
273#define ISCSI_PDU_INORDER_EN (1 << ISCSI_PARAM_PDU_INORDER_EN) 277#define ISCSI_PDU_INORDER_EN (1ULL << ISCSI_PARAM_PDU_INORDER_EN)
274#define ISCSI_DATASEQ_INORDER_EN (1 << ISCSI_PARAM_DATASEQ_INORDER_EN) 278#define ISCSI_DATASEQ_INORDER_EN (1ULL << ISCSI_PARAM_DATASEQ_INORDER_EN)
275#define ISCSI_ERL (1 << ISCSI_PARAM_ERL) 279#define ISCSI_ERL (1ULL << ISCSI_PARAM_ERL)
276#define ISCSI_IFMARKER_EN (1 << ISCSI_PARAM_IFMARKER_EN) 280#define ISCSI_IFMARKER_EN (1ULL << ISCSI_PARAM_IFMARKER_EN)
277#define ISCSI_OFMARKER_EN (1 << ISCSI_PARAM_OFMARKER_EN) 281#define ISCSI_OFMARKER_EN (1ULL << ISCSI_PARAM_OFMARKER_EN)
278#define ISCSI_EXP_STATSN (1 << ISCSI_PARAM_EXP_STATSN) 282#define ISCSI_EXP_STATSN (1ULL << ISCSI_PARAM_EXP_STATSN)
279#define ISCSI_TARGET_NAME (1 << ISCSI_PARAM_TARGET_NAME) 283#define ISCSI_TARGET_NAME (1ULL << ISCSI_PARAM_TARGET_NAME)
280#define ISCSI_TPGT (1 << ISCSI_PARAM_TPGT) 284#define ISCSI_TPGT (1ULL << ISCSI_PARAM_TPGT)
281#define ISCSI_PERSISTENT_ADDRESS (1 << ISCSI_PARAM_PERSISTENT_ADDRESS) 285#define ISCSI_PERSISTENT_ADDRESS (1ULL << ISCSI_PARAM_PERSISTENT_ADDRESS)
282#define ISCSI_PERSISTENT_PORT (1 << ISCSI_PARAM_PERSISTENT_PORT) 286#define ISCSI_PERSISTENT_PORT (1ULL << ISCSI_PARAM_PERSISTENT_PORT)
283#define ISCSI_SESS_RECOVERY_TMO (1 << ISCSI_PARAM_SESS_RECOVERY_TMO) 287#define ISCSI_SESS_RECOVERY_TMO (1ULL << ISCSI_PARAM_SESS_RECOVERY_TMO)
284#define ISCSI_CONN_PORT (1 << ISCSI_PARAM_CONN_PORT) 288#define ISCSI_CONN_PORT (1ULL << ISCSI_PARAM_CONN_PORT)
285#define ISCSI_CONN_ADDRESS (1 << ISCSI_PARAM_CONN_ADDRESS) 289#define ISCSI_CONN_ADDRESS (1ULL << ISCSI_PARAM_CONN_ADDRESS)
286#define ISCSI_USERNAME (1 << ISCSI_PARAM_USERNAME) 290#define ISCSI_USERNAME (1ULL << ISCSI_PARAM_USERNAME)
287#define ISCSI_USERNAME_IN (1 << ISCSI_PARAM_USERNAME_IN) 291#define ISCSI_USERNAME_IN (1ULL << ISCSI_PARAM_USERNAME_IN)
288#define ISCSI_PASSWORD (1 << ISCSI_PARAM_PASSWORD) 292#define ISCSI_PASSWORD (1ULL << ISCSI_PARAM_PASSWORD)
289#define ISCSI_PASSWORD_IN (1 << ISCSI_PARAM_PASSWORD_IN) 293#define ISCSI_PASSWORD_IN (1ULL << ISCSI_PARAM_PASSWORD_IN)
290#define ISCSI_FAST_ABORT (1 << ISCSI_PARAM_FAST_ABORT) 294#define ISCSI_FAST_ABORT (1ULL << ISCSI_PARAM_FAST_ABORT)
291#define ISCSI_ABORT_TMO (1 << ISCSI_PARAM_ABORT_TMO) 295#define ISCSI_ABORT_TMO (1ULL << ISCSI_PARAM_ABORT_TMO)
292#define ISCSI_LU_RESET_TMO (1 << ISCSI_PARAM_LU_RESET_TMO) 296#define ISCSI_LU_RESET_TMO (1ULL << ISCSI_PARAM_LU_RESET_TMO)
293#define ISCSI_HOST_RESET_TMO (1 << ISCSI_PARAM_HOST_RESET_TMO) 297#define ISCSI_HOST_RESET_TMO (1ULL << ISCSI_PARAM_HOST_RESET_TMO)
294#define ISCSI_PING_TMO (1 << ISCSI_PARAM_PING_TMO) 298#define ISCSI_PING_TMO (1ULL << ISCSI_PARAM_PING_TMO)
295#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)
296 303
297/* iSCSI HBA params */ 304/* iSCSI HBA params */
298enum iscsi_host_param { 305enum iscsi_host_param {
@@ -303,10 +310,10 @@ enum iscsi_host_param {
303 ISCSI_HOST_PARAM_MAX, 310 ISCSI_HOST_PARAM_MAX,
304}; 311};
305 312
306#define ISCSI_HOST_HWADDRESS (1 << ISCSI_HOST_PARAM_HWADDRESS) 313#define ISCSI_HOST_HWADDRESS (1ULL << ISCSI_HOST_PARAM_HWADDRESS)
307#define ISCSI_HOST_INITIATOR_NAME (1 << ISCSI_HOST_PARAM_INITIATOR_NAME) 314#define ISCSI_HOST_INITIATOR_NAME (1ULL << ISCSI_HOST_PARAM_INITIATOR_NAME)
308#define ISCSI_HOST_NETDEV_NAME (1 << ISCSI_HOST_PARAM_NETDEV_NAME) 315#define ISCSI_HOST_NETDEV_NAME (1ULL << ISCSI_HOST_PARAM_NETDEV_NAME)
309#define ISCSI_HOST_IPADDRESS (1 << ISCSI_HOST_PARAM_IPADDRESS) 316#define ISCSI_HOST_IPADDRESS (1ULL << ISCSI_HOST_PARAM_IPADDRESS)
310 317
311#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) 318#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle)
312#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) 319#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr)