From: Gleb C. <lna...@ya...> - 2023-10-10 11:52:03
|
Commit: 48e0466 GitHub URL: https://github.com/SCST-project/scst/commit/48e04668d62e76232645ae93ea02150349a18636 Author: Gleb Chesnokov Date: 2023-10-10T14:51:33+03:00 Log Message: ----------- qla2x00t: Drop redundant pci_enable_pcie_error_reporting() See also commits: - 7d1afe8a ("qla2x00t-32gbit: Drop redundant pci_enable_pcie_error_reporting()"). - 596800ce ("qla2x00t-32gbit: Backport to older kernel versions"). Modified Paths: -------------- qla2x00t/qla_def.h | 4 ++++ qla2x00t/qla_os.c | 4 ++++ 2 files changed, 8 insertions(+) =================================================================== diff --git a/qla2x00t/qla_def.h b/qla2x00t/qla_def.h index 19bdec1..3e78f97 100644 --- a/qla2x00t/qla_def.h +++ b/qla2x00t/qla_def.h @@ -7,7 +7,9 @@ #ifndef __QLA_DEF_H #define __QLA_DEF_H +#ifndef INSIDE_KERNEL_TREE #include <linux/version.h> +#endif #include <linux/kernel.h> #include <linux/init.h> #include <linux/types.h> @@ -24,7 +26,9 @@ #include <linux/interrupt.h> #include <linux/workqueue.h> #include <linux/firmware.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) #include <linux/aer.h> +#endif #include <linux/mutex.h> #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) || \ diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 5d34b93..f9c3ea8 100644 --- a/qla2x00t/qla_os.c +++ b/qla2x00t/qla_os.c @@ -2367,8 +2367,10 @@ 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) /* This may fail but that's ok */ pci_enable_pcie_error_reporting(pdev); +#endif ha = kzalloc(sizeof(struct qla_hw_data), GFP_KERNEL); if (!ha) { @@ -3020,7 +3022,9 @@ qla2x00_remove_one(struct pci_dev *pdev) kfree(ha); ha = NULL; +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) pci_disable_pcie_error_reporting(pdev); +#endif pci_disable_device(pdev); pci_set_drvdata(pdev, NULL); } |