diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-02-19 10:50:20 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-04-07 04:48:44 -0400 |
commit | 8085176fd9f62122aea094075d98177dac92b928 (patch) | |
tree | ef0a290f06b593db2c99215cc1358e42636b60ff /drivers/target/iscsi/iscsi_target_tpg.c | |
parent | 5b168dcd6aa69f7421a7738eada749d376dd1253 (diff) |
Target/configfs: Expose iSCSI network portal group T10-PI support
User may enable T10-PI support per network portal group. any connection
established on top of it, will be required to serve protected transactions.
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_tpg.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_tpg.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_tpg.c b/drivers/target/iscsi/iscsi_target_tpg.c index 76c2b2403ed6..eb96b20dc09e 100644 --- a/drivers/target/iscsi/iscsi_target_tpg.c +++ b/drivers/target/iscsi/iscsi_target_tpg.c | |||
@@ -860,3 +860,22 @@ int iscsit_ta_default_erl( | |||
860 | 860 | ||
861 | return 0; | 861 | return 0; |
862 | } | 862 | } |
863 | |||
864 | int iscsit_ta_t10_pi( | ||
865 | struct iscsi_portal_group *tpg, | ||
866 | u32 flag) | ||
867 | { | ||
868 | struct iscsi_tpg_attrib *a = &tpg->tpg_attrib; | ||
869 | |||
870 | if ((flag != 0) && (flag != 1)) { | ||
871 | pr_err("Illegal value %d\n", flag); | ||
872 | return -EINVAL; | ||
873 | } | ||
874 | |||
875 | a->t10_pi = flag; | ||
876 | pr_debug("iSCSI_TPG[%hu] - T10 Protection information bit:" | ||
877 | " %s\n", tpg->tpgt, (a->t10_pi) ? | ||
878 | "ON" : "OFF"); | ||
879 | |||
880 | return 0; | ||
881 | } | ||