|
@@ -1846,6 +1846,8 @@ static int scsi_mq_prep_fn(struct request *req)
|
|
next_rq->special = bidi_sdb;
|
|
next_rq->special = bidi_sdb;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ blk_mq_start_request(req);
|
|
|
|
+
|
|
return scsi_setup_cmnd(sdev, req);
|
|
return scsi_setup_cmnd(sdev, req);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1880,17 +1882,19 @@ static int scsi_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *req,
|
|
if (!scsi_host_queue_ready(q, shost, sdev))
|
|
if (!scsi_host_queue_ready(q, shost, sdev))
|
|
goto out_dec_target_busy;
|
|
goto out_dec_target_busy;
|
|
|
|
|
|
|
|
+
|
|
if (!(req->cmd_flags & REQ_DONTPREP)) {
|
|
if (!(req->cmd_flags & REQ_DONTPREP)) {
|
|
ret = prep_to_mq(scsi_mq_prep_fn(req));
|
|
ret = prep_to_mq(scsi_mq_prep_fn(req));
|
|
if (ret)
|
|
if (ret)
|
|
goto out_dec_host_busy;
|
|
goto out_dec_host_busy;
|
|
req->cmd_flags |= REQ_DONTPREP;
|
|
req->cmd_flags |= REQ_DONTPREP;
|
|
|
|
+ } else {
|
|
|
|
+ blk_mq_start_request(req);
|
|
}
|
|
}
|
|
|
|
|
|
scsi_init_cmd_errh(cmd);
|
|
scsi_init_cmd_errh(cmd);
|
|
cmd->scsi_done = scsi_mq_done;
|
|
cmd->scsi_done = scsi_mq_done;
|
|
|
|
|
|
- blk_mq_start_request(req);
|
|
|
|
reason = scsi_dispatch_cmd(cmd);
|
|
reason = scsi_dispatch_cmd(cmd);
|
|
if (reason) {
|
|
if (reason) {
|
|
scsi_set_blocked(cmd, reason);
|
|
scsi_set_blocked(cmd, reason);
|