diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h index 6fe6b3046..f49c45e9a 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h @@ -4,7 +4,8 @@ #define QLT_USE_PERCPU_IDA 0 #define QLT_USE_SBITMAP 0 #include -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && \ + !(defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 8) #define QLT_USE_PERCPU_IDA 1 #define QLT_USE_SBITMAP 0 /* See also commit 798ab48eecdf ("idr: Percpu ida") # v3.12 */ diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index ee8b30eee..9eefda265 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -7149,7 +7149,8 @@ static int qla2xxx_map_queues(struct Scsi_Host *shost) { int rc; scsi_qla_host_t *vha = (scsi_qla_host_t *)shost->hostdata; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0) || \ + (defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 8) struct blk_mq_queue_map *qmap = &shost->tag_set.map[0]; if (USER_CTRL_IRQ(vha->hw) || !vha->hw->mqiobase) diff --git a/scst/include/backport.h b/scst/include/backport.h index f1cac9c3c..8d88e9783 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -143,7 +143,8 @@ static inline unsigned int scst_blk_rq_cpu(struct request *rq) * affinity") # v2.6.28. */ return 0; -#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) +#elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8) return rq->cpu; #else return blk_mq_rq_cpu(rq); @@ -523,8 +524,9 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) /* */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) || \ - LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25) || \ + LINUX_VERSION_CODE >= KERNEL_VERSION(4, 21, 0) || \ + (defined(RHEL_MAJOR) && RHEL_MAJOR -0 >= 8) static inline struct io_context * scst_get_task_io_context(struct task_struct *task, diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index e63e53fc6..13b560b17 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8594,7 +8594,8 @@ static void scsi_end_async(struct request *req, blk_status_t error) kmem_cache_free(scsi_io_context_cache, sioc); -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 21, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8) /* See also commit 92bc5a24844a ("block: remove __blk_put_request()") */ __blk_put_request(req->q, req); #else