From 34d3a43f2df8c4efd7027a89c9f375f086280102 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Mon, 20 Jan 2025 17:58:23 +0300 Subject: [PATCH] qla2x00t, qla2x00t-32gbit: Fix the RHEL 9.5 build Fixes: https://github.com/SCST-project/scst/issues/272 --- qla2x00t-32gbit/qla_os.c | 12 +++++++++--- qla2x00t/qla_os.c | 8 ++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 04874494a..f6d8a5109 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -3020,7 +3020,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) ql2xallocfwdump = 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -4047,7 +4049,9 @@ qla2x00_remove_one(struct pci_dev *pdev) pci_release_selected_regions(ha->pdev, ha->bars); kfree(ha); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif @@ -6948,7 +6952,9 @@ qla2x00_disable_board_on_pci_error(struct work_struct *work) qla2x00_unmap_iobases(ha); pci_release_selected_regions(ha->pdev, ha->bars); -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev); diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index f9c3ea8d7..c9cc17a78 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -2367,7 +2367,9 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) goto probe_out; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); #endif @@ -3022,7 +3024,9 @@ qla2x00_remove_one(struct pci_dev *pdev) kfree(ha); ha = NULL; -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 5)) pci_disable_pcie_error_reporting(pdev); #endif pci_disable_device(pdev);