@@ -565,10 +565,10 @@ static int tcm_loop_queue_data_or_status(const char *func,
memcpy(sc->sense_buffer, se_cmd->sense_buffer,
SCSI_SENSE_BUFFERSIZE);
- sc->result = SAM_STAT_CHECK_CONDITION;
+ sc->status.combined = SAM_STAT_CHECK_CONDITION;
set_driver_byte(sc, DRIVER_SENSE);
} else
- sc->result = scsi_status;
+ sc->status.combined = scsi_status;
set_host_byte(sc, DID_OK);
if ((se_cmd->se_cmd_flags & SCF_OVERFLOW_BIT) ||
@@ -1043,13 +1043,13 @@ static void pscsi_req_done(struct request *req, blk_status_t status)
{
struct se_cmd *cmd = req->end_io_data;
struct pscsi_plugin_task *pt = cmd->priv;
- int result = scsi_req(req)->result;
+ union scsi_status result = scsi_req(req)->status;
enum sam_status scsi_status = status_byte(result) << 1;
if (scsi_status != SAM_STAT_GOOD) {
pr_debug("PSCSI Status Byte exception at cmd: %p CDB:"
" 0x%02x Result: 0x%08x\n", cmd, pt->pscsi_cdb[0],
- result);
+ result.combined);
}
pscsi_complete_cmd(cmd, scsi_status, scsi_req(req)->sense);
@@ -1062,7 +1062,7 @@ static void pscsi_req_done(struct request *req, blk_status_t status)
default:
pr_debug("PSCSI Host Byte exception at cmd: %p CDB:"
" 0x%02x Result: 0x%08x\n", cmd, pt->pscsi_cdb[0],
- result);
+ result.combined);
target_complete_cmd(cmd, SAM_STAT_CHECK_CONDITION);
break;
}
An explanation of the purpose of this patch is available in the patch "scsi: Introduce the scsi_status union". Cc: Mike Christie <michael.christie@oracle.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> --- drivers/target/loopback/tcm_loop.c | 4 ++-- drivers/target/target_core_pscsi.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-)