summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_fabric_configfs.c
diff options
context:
space:
mode:
authorDmitry Bogdanov <d.bogdanov@yadro.com>2023-03-01 11:45:09 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-03-10 05:29:23 +0300
commit3f4b9cb4133a4ecf16447cbd5fdb8ed618593bf8 (patch)
tree9df3276580419b9ad7a3226cd0452ff68741e05e /drivers/target/target_core_fabric_configfs.c
parentfe15c26ee26efa11741a7b632e9f23b01aca4cc6 (diff)
downloadlinux-3f4b9cb4133a4ecf16447cbd5fdb8ed618593bf8.tar.xz
scsi: target: core: Add RTPI field to target port
SAM-5 4.6.5.2 (Relative Port Identifier attribute) defines the attribute as unique across SCSI target ports. The change introduces RTPI attribute to se_portal group. The value is unique across all enabled SCSI target ports. It also limits number of SCSI target ports to 65535. Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com> Link: https://lore.kernel.org/r/20230301084512.21956-2-d.bogdanov@yadro.com Reviewed-by: Mike Christie <michael.christie@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_fabric_configfs.c')
-rw-r--r--drivers/target/target_core_fabric_configfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/target/target_core_fabric_configfs.c b/drivers/target/target_core_fabric_configfs.c
index 67b18a67317a..873da49ab704 100644
--- a/drivers/target/target_core_fabric_configfs.c
+++ b/drivers/target/target_core_fabric_configfs.c
@@ -836,13 +836,12 @@ static ssize_t target_fabric_tpg_base_enable_store(struct config_item *item,
if (se_tpg->enabled == op)
return count;
-
- ret = se_tpg->se_tpg_tfo->fabric_enable_tpg(se_tpg, op);
+ if (op)
+ ret = target_tpg_enable(se_tpg);
+ else
+ ret = target_tpg_disable(se_tpg);
if (ret)
return ret;
-
- se_tpg->enabled = op;
-
return count;
}