From 48e04668d62e76232645ae93ea02150349a18636 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Sat, 23 Sep 2023 10:51:37 +0300 Subject: [PATCH] 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"). --- 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 19bdec1be..3e78f978a 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 +#endif #include #include #include @@ -24,7 +26,9 @@ #include #include #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0) #include +#endif #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) || \ diff --git a/qla2x00t/qla_os.c b/qla2x00t/qla_os.c index 5d34b93d0..f9c3ea8d7 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); }