Skip to content

Commit

Permalink
qla2x00t, qla2x00t-32gbit: Fix the RHEL 9.5 build
Browse files Browse the repository at this point in the history
Fixes: #272
  • Loading branch information
lnocturno committed Jan 20, 2025
1 parent ba7c9d7 commit 34d3a43
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
12 changes: 9 additions & 3 deletions qla2x00t-32gbit/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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);
Expand Down
8 changes: 6 additions & 2 deletions qla2x00t/qla_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 34d3a43

Please sign in to comment.