scst: Port to Linux kernel v4.10

This commit is contained in:
Bart Van Assche
2016-12-22 03:40:13 -08:00
committed by Bart Van Assche
parent cf185c85c0
commit e45cbab700
2 changed files with 17 additions and 1 deletions

View File

@@ -23,6 +23,7 @@
#include <linux/blkdev.h> /* struct request_queue */
#include <linux/scatterlist.h> /* struct scatterlist */
#include <linux/slab.h> /* kmalloc() */
#include <linux/version.h>
#include <linux/writeback.h> /* sync_page_range() */
#include <scsi/scsi_cmnd.h> /* struct scsi_cmnd */
#include <rdma/ib_verbs.h>
@@ -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
/* <linux/compiler.h> */
#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
/* <scsi/libfc.h> */
/*
* 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
/* <scsi/scsi_cmnd.h> */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)

View File

@@ -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: