diff --git a/scst/include/backport.h b/scst/include/backport.h index ea40cea6d..ae047951a 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -23,6 +23,7 @@ #include /* struct request_queue */ #include /* struct scatterlist */ #include /* kmalloc() */ +#include #include /* sync_page_range() */ #include /* struct scsi_cmnd */ #include @@ -53,6 +54,10 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) } #endif +#ifndef RQF_COPY_USER +#define RQF_COPY_USER REQ_COPY_USER +#endif + /* */ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) @@ -699,6 +704,17 @@ static inline void put_unaligned_be64(uint64_t i, void *p) } #endif +/* */ + +/* + * See also commit 75cc8cfc6e13 (scsi: change FC drivers to use 'struct + * bsg_job') + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) || 1 +#define fc_bsg_job bsg_job +#define fc_bsg_jobdone bsg_job_done +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index db5bae183..bde0ec313 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8103,7 +8103,7 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, if (bw != NULL) { atomic_set(&bw->bios_inflight, bios); - rq->cmd_flags |= REQ_COPY_USER; + rq->cmd_flags |= RQF_COPY_USER; } out: