aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_pscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_pscsi.c')
-rw-r--r--drivers/target/target_core_pscsi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index d5828da3d392..5b23a0ff905e 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -1032,25 +1032,24 @@ static void pscsi_req_done(struct request *req, blk_status_t status)
{
struct se_cmd *cmd = req->end_io_data;
struct scsi_cmnd *scmd = blk_mq_rq_to_pdu(req);
- int result = scsi_req(req)->result;
- enum sam_status scsi_status = result & 0xff;
+ enum sam_status scsi_status = scmd->result & 0xff;
u8 *cdb = cmd->priv;
if (scsi_status != SAM_STAT_GOOD) {
pr_debug("PSCSI Status Byte exception at cmd: %p CDB:"
- " 0x%02x Result: 0x%08x\n", cmd, cdb[0], result);
+ " 0x%02x Result: 0x%08x\n", cmd, cdb[0], scmd->result);
}
pscsi_complete_cmd(cmd, scsi_status, scmd->sense_buffer);
- switch (host_byte(result)) {
+ switch (host_byte(scmd->result)) {
case DID_OK:
target_complete_cmd_with_length(cmd, scsi_status,
cmd->data_length - scmd->resid_len);
break;
default:
pr_debug("PSCSI Host Byte exception at cmd: %p CDB:"
- " 0x%02x Result: 0x%08x\n", cmd, cdb[0], result);
+ " 0x%02x Result: 0x%08x\n", cmd, cdb[0], scmd->result);
target_complete_cmd(cmd, SAM_STAT_CHECK_CONDITION);
break;
}