diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2014-02-19 17:50:20 +0200 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-04-07 01:48:44 -0700 |
commit | 8085176fd9f62122aea094075d98177dac92b928 (patch) | |
tree | ef0a290f06b593db2c99215cc1358e42636b60ff /drivers/target/iscsi/iscsi_target_tpg.c | |
parent | 5b168dcd6aa69f7421a7738eada749d376dd1253 (diff) | |
download | blackbird-obmc-linux-8085176fd9f62122aea094075d98177dac92b928.tar.gz blackbird-obmc-linux-8085176fd9f62122aea094075d98177dac92b928.zip |
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( return 0; } + +int iscsit_ta_t10_pi( + struct iscsi_portal_group *tpg, + u32 flag) +{ + struct iscsi_tpg_attrib *a = &tpg->tpg_attrib; + + if ((flag != 0) && (flag != 1)) { + pr_err("Illegal value %d\n", flag); + return -EINVAL; + } + + a->t10_pi = flag; + pr_debug("iSCSI_TPG[%hu] - T10 Protection information bit:" + " %s\n", tpg->tpgt, (a->t10_pi) ? + "ON" : "OFF"); + + return 0; +} |