From 4219f00e1069ca1857805ed5b91b2e358eb07c3a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 4 Nov 2018 04:11:27 +0000 Subject: [PATCH] Merge r7421 from trunk git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7674 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 10 ---------- scst/include/scst.h | 2 +- scst_local/scst_local.c | 7 +++++++ 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 7de532cf6..15b4bd634 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -90,16 +90,6 @@ static inline unsigned int queue_max_hw_sectors(struct request_queue *q) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) -static inline void blk_queue_flag_set(unsigned int flag, - struct request_queue *q) -{ -#if !defined(RHEL_MAJOR) || RHEL_MAJOR -0 >= 6 - queue_flag_set_unlocked(flag, q); -#endif -} -#endif - /* */ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 20) diff --git a/scst/include/scst.h b/scst/include/scst.h index 7a43769db..0a500aa91 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -4975,7 +4975,7 @@ static inline struct scatterlist *sg_next_inline(struct scatterlist *sg) static inline void sg_clear(struct scatterlist *sg) { memset(sg, 0, sizeof(*sg)); -#ifdef CONFIG_DEBUG_SG +#if 0 // def CONFIG_DEBUG_SG sg->sg_magic = SG_MAGIC; #endif } diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 5fbf98d49..45a9f03cc 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1230,7 +1230,14 @@ static int scst_local_change_queue_depth(struct scsi_device *sdev, int qdepth) static int scst_local_slave_alloc(struct scsi_device *sdev) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) +#if !defined(RHEL_MAJOR) || RHEL_MAJOR -0 >= 6 + queue_flag_set_unlocked(QUEUE_FLAG_BIDI, sdev->request_queue); +#endif +#else blk_queue_flag_set(QUEUE_FLAG_BIDI, sdev->request_queue); +#endif + return 0; }