From: Gleb C. <lna...@ya...> - 2025-06-06 09:36:10
|
Commit: 4b61f2b GitHub URL: https://github.com/SCST-project/scst/commit/4b61f2b4ace034aeaacd9d94c2ced6c4bb9b4dfc Author: Gleb Chesnokov Date: 2025-06-06T12:33:37+03:00 Log Message: ----------- scst.h: Fix RHEL 9 build Fixes: https://github.com/SCST-project/scst/issues/294 Modified Paths: -------------- qla2x00t-32gbit/qla_os.c | 8 ++++++-- scst/include/scst.h | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index f6d8a51..6263d32 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -1997,7 +1997,9 @@ qla2xxx_slave_configure(struct scsi_device *sdev) scsi_qla_host_t *vha = shost_priv(sdev->host); struct req_que *req = vha->req; -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 6)) if (IS_T10_PI_CAPABLE(vha->hw)) blk_queue_update_dma_alignment(sdev->request_queue, 0x7); #endif @@ -3638,7 +3640,9 @@ skip_dpc: QLA_SG_ALL : 128; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 10, 0) || \ + (defined(RHEL_RELEASE_CODE) && \ + RHEL_RELEASE_CODE -0 >= RHEL_RELEASE_VERSION(9, 6)) if (IS_T10_PI_CAPABLE(base_vha->hw)) host->dma_alignment = 0x7; #endif diff --git a/scst/include/scst.h b/scst/include/scst.h index 878a125..f0a7e3e 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -5651,14 +5651,15 @@ __scst_scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd, unsigned char *sense, unsigned int sense_len, int timeout, int retries, blk_opf_t opf) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 3, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 3)) if (WARN_ON_ONCE(sense && sense_len != SCSI_SENSE_BUFFERSIZE)) return -EINVAL; #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0) return scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense, timeout, retries, opf, /*resid=*/NULL); - #elif LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 0) && \ (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8) return scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense, @@ -5669,7 +5670,6 @@ __scst_scsi_execute_cmd(struct scsi_device *sdev, const unsigned char *cmd, /*sshdr=*/NULL, timeout, retries, opf, /*rq_flags=*/0, /*resid=*/NULL); #endif - #else opf |= data_direction == DMA_TO_DEVICE ? REQ_OP_DRV_OUT : REQ_OP_DRV_IN; |