summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_sbc.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2021-04-27 10:30:45 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-05-31 22:48:24 -0400
commit14b40c1e7ccc07e486719362f6f29ec5e3151331 (patch)
tree8452c84427dcc1c562b1d62122d4093894644558 /drivers/target/target_core_sbc.c
parenta7479a8477e61420df43e1e8964986d90764efca (diff)
downloadlinux-14b40c1e7ccc07e486719362f6f29ec5e3151331.tar.bz2
scsi: target: Use standard SAM status types
target_complete_cmd() and friends requires a SAM status type, so passing GOOD here is actually wrong. Link: https://lore.kernel.org/r/20210427083046.31620-40-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target/target_core_sbc.c')
-rw-r--r--drivers/target/target_core_sbc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index 7b07e557dc8d..b32f4ee88e79 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -67,7 +67,7 @@ sbc_emulate_readcapacity(struct se_cmd *cmd)
transport_kunmap_data_sg(cmd);
}
- target_complete_cmd_with_length(cmd, GOOD, 8);
+ target_complete_cmd_with_length(cmd, SAM_STAT_GOOD, 8);
return 0;
}
@@ -130,7 +130,7 @@ sbc_emulate_readcapacity_16(struct se_cmd *cmd)
transport_kunmap_data_sg(cmd);
}
- target_complete_cmd_with_length(cmd, GOOD, 32);
+ target_complete_cmd_with_length(cmd, SAM_STAT_GOOD, 32);
return 0;
}
@@ -202,14 +202,14 @@ sbc_execute_write_same_unmap(struct se_cmd *cmd)
return ret;
}
- target_complete_cmd(cmd, GOOD);
+ target_complete_cmd(cmd, SAM_STAT_GOOD);
return 0;
}
static sense_reason_t
sbc_emulate_noop(struct se_cmd *cmd)
{
- target_complete_cmd(cmd, GOOD);
+ target_complete_cmd(cmd, SAM_STAT_GOOD);
return 0;
}
@@ -1245,7 +1245,7 @@ sbc_execute_unmap(struct se_cmd *cmd)
err:
transport_kunmap_data_sg(cmd);
if (!ret)
- target_complete_cmd(cmd, GOOD);
+ target_complete_cmd(cmd, SAM_STAT_GOOD);
return ret;
}