[PATCH 4/4] [LIO-Target]: Add iscsi_get_fabric_proto_ident() for EVPD PIV=1 usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From b68717b2b25af169ef52b16d796f120c2819eaae Mon Sep 17 00:00:00 2001
From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx>
Date: Sun, 1 Feb 2009 21:46:52 -0800
Subject: [PATCH 4/4] [LIO-Target]: Add iscsi_get_fabric_proto_ident() for EVPD PIV=1 usage

This patch adds the SPC-4 defined PROTOCOL IDENTIFIER value for
iSCSI (0x5) in iscsi_get_fabric_proto_ident(), which is attached to
struct target_core_fabric_ops->get_fabric_proto_ident() during
LIO-Target v3.0 module registration with Target_Core_Mod/ConfigFS.

Signed-off-by: Nicholas A. Bellinger <nab@xxxxxxxxxxxxxxx>
---
 drivers/lio-core/iscsi_target.c          |    9 +++++++++
 drivers/lio-core/iscsi_target.h          |    1 +
 drivers/lio-core/iscsi_target_configfs.c |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/drivers/lio-core/iscsi_target.c b/drivers/lio-core/iscsi_target.c
index 2a952d6..f800a27 100644
--- a/drivers/lio-core/iscsi_target.c
+++ b/drivers/lio-core/iscsi_target.c
@@ -1326,6 +1326,15 @@ extern char *iscsi_get_fabric_name (void)
 	return("iSCSI");
 }
 
+extern u8 iscsi_get_fabric_proto_ident (void)
+{
+	/*
+	 * This value is defined for "Internet SCSI (iSCSI)"
+	 * in spc4r17 section 7.5.1 Table 362
+	 */
+	return(0x5);
+}
+
 extern iscsi_cmd_t *iscsi_get_cmd (se_cmd_t *se_cmd)
 {
         return((iscsi_cmd_t *)se_cmd->se_fabric_cmd_ptr);
diff --git a/drivers/lio-core/iscsi_target.h b/drivers/lio-core/iscsi_target.h
index 91b3cb5..d0cf724 100644
--- a/drivers/lio-core/iscsi_target.h
+++ b/drivers/lio-core/iscsi_target.h
@@ -47,6 +47,7 @@ extern struct iscsi_np_s *core_add_np (iscsi_np_addr_t *, int, int *);
 extern int core_reset_np_thread (struct iscsi_np_s *, struct iscsi_tpg_np_s *, struct iscsi_portal_group_s *, int);
 extern int core_del_np (iscsi_np_t *);
 extern char *iscsi_get_fabric_name (void);
+extern u8 iscsi_get_fabric_proto_ident (void);
 extern iscsi_cmd_t *iscsi_get_cmd (struct se_cmd_s *);
 extern u32 iscsi_get_task_tag (struct se_cmd_s *);
 extern int iscsi_get_cmd_state (struct se_cmd_s *);
diff --git a/drivers/lio-core/iscsi_target_configfs.c b/drivers/lio-core/iscsi_target_configfs.c
index 0d91c7d..696f117 100644
--- a/drivers/lio-core/iscsi_target_configfs.c
+++ b/drivers/lio-core/iscsi_target_configfs.c
@@ -2300,6 +2300,7 @@ extern int iscsi_target_register_configfs (void)
 	 * Temporary OPs function pointers used by target_core_mod..
 	 */
 	fabric->tf_ops.get_fabric_name = &iscsi_get_fabric_name;
+	fabric->tf_ops.get_fabric_proto_ident = &iscsi_get_fabric_proto_ident;
 	fabric->tf_ops.tpg_get_wwn = &lio_tpg_get_endpoint_wwn;
 	fabric->tf_ops.tpg_get_tag = &lio_tpg_get_tag;
 	fabric->tf_ops.tpg_get_default_depth = &lio_tpg_get_default_depth;
-- 
1.5.4.1



--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux