scst/include/backport.h: Port to the latest UEK kernels

This patch fixes the build against UEK kernel versions
5.4.17-2136.330.7.1.el8uek, 5.15.0-205.149.5.1.el9uek.
This commit is contained in:
Gleb Chesnokov
2024-05-02 16:33:18 +03:00
parent 71abad275e
commit 48ef50966a

View File

@@ -1675,7 +1675,8 @@ static inline void scsi_build_sense(struct scsi_cmnd *scmd, int desc,
LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 203)) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 7) || \
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(9, 0))
RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(9, 0)) && \
!defined(UEK_KABI_RENAME)
/*
* See also 51f3a4788928 ("scsi: core: Introduce the scsi_cmd_to_rq()
* function") # v5.15.
@@ -1733,7 +1734,9 @@ static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd)
!(LINUX_VERSION_CODE >> 8 == KERNEL_VERSION(5, 15, 0) >> 8 && \
LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 136)) && \
(!defined(RHEL_RELEASE_CODE) || \
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1))
RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1)) && \
(!defined(UEK_KABI_RENAME) || \
LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0))
/*
* See also commit 11b68e36b167 ("scsi: core: Call scsi_done directly") # v5.16.
* See also commit d2746cdfd5e5 ("scsi: core: Rename scsi_mq_done() into scsi_done() and export