qla2x00t, qla2x00t-32gbit: Fix the RHEL 9.5 build

Fixes: https://github.com/SCST-project/scst/issues/272
This commit is contained in:
Gleb Chesnokov
2025-01-20 17:58:23 +03:00
parent ddd7f084c8
commit 84179fa135
2 changed files with 15 additions and 5 deletions

View File

@@ -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);

View File

@@ -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);