summaryrefslogtreecommitdiff
path: root/drivers/target/target_core_transport.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-02-19 17:50:15 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2014-03-13 12:03:02 -0700
commit19f9361af7dfa0bb1f98c7619544ed71d2dded39 (patch)
tree4afa7db32e56d65500661134906c729699f226bc /drivers/target/target_core_transport.c
parentacb2bde3e32100f1ab50e38f0db03660a1cb0a06 (diff)
Target/sbc: Set protection operation and relevant checks
SBC-3 mandates the protection checks that must be performed in the rdprotect/wrprotect field. Use them. According to backstore device pi_attributes and cdb rdprotect/wrprotect field. (Fix incorrect se_cmd->prot_type -> TARGET_PROT_NORMAL comparision in transport_generic_new_cmd - nab) (Fix missing break in sbc_set_prot_op_checks - DanC + Sagi) Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 6ddd4cfc53ba..4653d826e595 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -2206,7 +2206,7 @@ transport_generic_new_cmd(struct se_cmd *cmd)
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
}
- if (cmd->prot_type != TARGET_PROT_NORMAL) {
+ if (cmd->prot_op != TARGET_PROT_NORMAL) {
ret = target_alloc_sgl(&cmd->t_prot_sg,
&cmd->t_prot_nents,
cmd->prot_length, true);