mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
scst.h: Fix RHEL 9 build
Fixes: https://github.com/SCST-project/scst/issues/294
This commit is contained in:
@@ -2006,7 +2006,9 @@ qla2xxx_sdev_configure(struct scsi_device *sdev, struct queue_limits *lim)
|
||||
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
|
||||
@@ -3658,7 +3660,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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user