aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r--drivers/target/target_core_device.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index 2d0353355ebd..8d774da16320 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -988,8 +988,9 @@ int se_dev_set_emulate_fua_write(struct se_device *dev, int flag)
988 return -EINVAL; 988 return -EINVAL;
989 } 989 }
990 990
991 if (flag && dev->transport->fua_write_emulated == 0) { 991 if (flag &&
992 pr_err("fua_write_emulated not supported\n"); 992 dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV) {
993 pr_err("emulate_fua_write not supported for pSCSI\n");
993 return -EINVAL; 994 return -EINVAL;
994 } 995 }
995 dev->se_sub_dev->se_dev_attrib.emulate_fua_write = flag; 996 dev->se_sub_dev->se_dev_attrib.emulate_fua_write = flag;
@@ -1019,8 +1020,9 @@ int se_dev_set_emulate_write_cache(struct se_device *dev, int flag)
1019 pr_err("Illegal value %d\n", flag); 1020 pr_err("Illegal value %d\n", flag);
1020 return -EINVAL; 1021 return -EINVAL;
1021 } 1022 }
1022 if (flag && dev->transport->write_cache_emulated == 0) { 1023 if (flag &&
1023 pr_err("write_cache_emulated not supported\n"); 1024 dev->transport->transport_type == TRANSPORT_PLUGIN_PHBA_PDEV) {
1025 pr_err("emulate_write_cache not supported for pSCSI\n");
1024 return -EINVAL; 1026 return -EINVAL;
1025 } 1027 }
1026 dev->se_sub_dev->se_dev_attrib.emulate_write_cache = flag; 1028 dev->se_sub_dev->se_dev_attrib.emulate_write_cache = flag;