scst: Unbreak the RHEL 9.7 build

Fixes: https://github.com/SCST-project/scst/issues/317
This commit is contained in:
Gleb Chesnokov
2025-11-19 10:17:08 +03:00
parent 9590762792
commit 13872f0398
5 changed files with 23 additions and 6 deletions

View File

@@ -38,6 +38,7 @@ jobs:
'3.18.140',
'3.10.108',
'6.12.0-55.34.1.el10_0^AlmaLinux^10.0',
'5.14.0-611.5.1.el9_7^AlmaLinux^9.7',
'5.14.0-570.46.1.el9_6^AlmaLinux^9.6',
'5.14.0-503.40.1.el9_5^AlmaLinux^9.5',
'5.14.0-427.42.1.el9_4^AlmaLinux^9.4',

View File

@@ -73,6 +73,7 @@ ABT_KERNELS=" \
3.11.10-nc \
3.10.108-nc \
6.12.0-55.34.1.el10_0^AlmaLinux^10.0-nc \
5.14.0-611.5.1.el9_7^AlmaLinux^9.7-nc \
5.14.0-570.46.1.el9_6^AlmaLinux^9.6-nc \
5.14.0-503.40.1.el9_5^AlmaLinux^9.5-nc \
5.14.0-427.42.1.el9_4^AlmaLinux^9.4-nc \

View File

@@ -13,7 +13,10 @@
#include <linux/delay.h>
#include <linux/nvme.h>
#include <linux/nvme-fc.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0))
#include <linux/blk-mq-pci.h>
#endif
#include <linux/blk-mq.h>
@@ -869,7 +872,10 @@ static void qla_nvme_map_queues(struct nvme_fc_local_port *lport,
{
struct scsi_qla_host *vha = lport->private;
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0))
blk_mq_pci_map_queues(map, vha->hw->pdev, vha->irq_offset);
#else
blk_mq_map_hw_queues(map, &vha->hw->pdev->dev, vha->irq_offset);

View File

@@ -14,8 +14,11 @@
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \
LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) && \
LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0))
#include <linux/blk-mq-pci.h>
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
@@ -8186,7 +8189,10 @@ static MAP_QUEUES_RET qla2xxx_map_queues(struct Scsi_Host *shost)
if (USER_CTRL_IRQ(vha->hw) || !vha->hw->mqiobase)
blk_mq_map_queues(qmap);
else
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0))
blk_mq_pci_map_queues(qmap, vha->hw->pdev, vha->irq_offset);
#else
blk_mq_map_hw_queues(qmap, &vha->hw->pdev->dev,

View File

@@ -8564,7 +8564,10 @@ static struct request *__blk_map_kern_sg(struct request_queue *q,
TRACE_DBG("len %zd, bytes %zd, offset %zd", len, bytes, offset);
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 14, 0) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 7) || \
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(10, 0))
rc = bio_add_pc_page(q, bio, page, bytes, offset);
#else
rc = bio_add_page(bio, page, bytes, offset);