From: Gleb C. <lna...@ya...> - 2024-01-10 16:35:45
|
Commit: 50e1bab GitHub URL: https://github.com/SCST-project/scst/commit/50e1babd394e27ce2fcb3f8c0973583addca781e Author: Gleb Chesnokov Date: 2024-01-10T19:34:49+03:00 Log Message: ----------- scst/include/backport.h: Fix backport for new stable kernels This patch fixes the build against kernel versions 5.4.263, 5.10.203, 5.15.136. Modified Paths: -------------- scst/include/backport.h | 26 +++++++++++---- 1 file changed, 19 insertions(+), 7 deletions(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index c8940e8..51ee162 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1621,13 +1621,21 @@ static inline void scsi_build_sense(struct scsi_cmnd *scmd, int desc, } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && \ - (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 7) || \ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0) && \ + !(LINUX_VERSION_CODE >> 8 == KERNEL_VERSION(5, 4, 0) >> 8 && \ + LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 263)) && \ + !(LINUX_VERSION_CODE >> 8 == KERNEL_VERSION(5, 10, 0) >> 8 && \ + 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)) /* * See also 51f3a4788928 ("scsi: core: Introduce the scsi_cmd_to_rq() - * function"). + * function") # v5.15. + * See also df0110425f42 ("scsi: core: Introduce the scsi_cmd_to_rq() + * function") # v5.4.263. + * See also b19fe82b4b92 ("scsi: core: Introduce the scsi_cmd_to_rq() + * function") # v5.10.203. */ static inline struct request *scsi_cmd_to_rq(struct scsi_cmnd *scmd) { @@ -1674,11 +1682,15 @@ static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && \ - (!defined(RHEL_RELEASE_CODE) || \ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0) && \ + !(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)) /* - * See also commit 11b68e36b167 ("scsi: core: Call scsi_done directly"; v5.16) + * 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 + * it") # v5.15.136. */ static inline void scsi_done(struct scsi_cmnd *cmd) { |