diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index e7d3cba55..214d221e6 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -3464,10 +3464,6 @@ static int scst_do_real_exec(struct scst_cmd *cmd) scsi_dev = dev->scsi_dev; - TRACE_DBG("Sending cmd %p to SCSI mid-level dev %d:%d:%d:%lld", cmd, - scsi_dev->host->host_no, scsi_dev->channel, scsi_dev->id, - (u64)scsi_dev->lun); - if (unlikely(scsi_dev == NULL)) { PRINT_ERROR("Command for virtual device must be " "processed by device handler (LUN %lld)!", @@ -3475,6 +3471,10 @@ static int scst_do_real_exec(struct scst_cmd *cmd) goto out_error; } + TRACE_DBG("Sending cmd %p to SCSI mid-level dev %d:%d:%d:%lld", cmd, + scsi_dev->host->host_no, scsi_dev->channel, scsi_dev->id, + (u64)scsi_dev->lun); + scst_set_exec_start(cmd); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)