diff --git a/scst/include/backport.h b/scst/include/backport.h index 978b1094e..b5c9d921d 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -178,23 +178,28 @@ static inline unsigned int scst_blk_rq_cpu(struct request *rq) #endif } -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0) /* - * See also commit b84ba30b6c7a ("block: remove the gendisk argument to - * blk_execute_rq") # v5.17. + * See also commit e2e530867245 ("blk-mq: remove the done argument to + * blk_execute_rq_nowait") # v5.19. */ static inline -void blk_execute_rq_nowait_backport(struct request *rq, bool at_head, - rq_end_io_fn *done) +void blk_execute_rq_nowait_backport(struct request *rq, bool at_head) { #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0) /* * See also commit 8eeed0b554b9 ("block: remove unnecessary argument from * blk_execute_rq_nowait") # v5.12. */ - blk_execute_rq_nowait(rq->q, NULL, rq, at_head, done); + blk_execute_rq_nowait(rq->q, NULL, rq, at_head, NULL); +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) + /* + * See also commit b84ba30b6c7a ("block: remove the gendisk argument to + * blk_execute_rq") # v5.17. + */ + blk_execute_rq_nowait(NULL, rq, at_head, NULL); #else - blk_execute_rq_nowait(NULL, rq, at_head, done); + blk_execute_rq_nowait(rq, at_head, NULL); #endif } diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index aa8660873..603e10ed0 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8627,11 +8627,13 @@ int scst_scsi_exec_async(struct scst_cmd *cmd, void *data, #else rq->retries = cmd->retries; #endif + rq->end_io = scsi_end_async; rq->end_io_data = sioc; + rq->cmd_flags |= REQ_FAILFAST_MASK; blk_execute_rq_nowait(rq, - (cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE), scsi_end_async); + (cmd->queue_type == SCST_CMD_QUEUE_HEAD_OF_QUEUE)); out: return res;