mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
qla2x00t-32gbit: Backport to older kernel versions
Backport the change from a previous commit to kernel versions prior to
v6.0, where commit f26e58bf6f54 ("PCI/AER: Enable error reporting when
AER is native") hasn't been introduced.
This commit is contained in:
@@ -6,6 +6,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>
|
||||
@@ -22,6 +25,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>
|
||||
#include <linux/btree.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
@@ -3010,6 +3010,11 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
ql2xallocfwdump = 0;
|
||||
}
|
||||
|
||||
#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) {
|
||||
ql_log_pci(ql_log_fatal, pdev, 0x0009,
|
||||
@@ -4019,6 +4024,10 @@ 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)
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
#endif
|
||||
|
||||
pci_disable_device(pdev);
|
||||
}
|
||||
|
||||
@@ -6894,6 +6903,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)
|
||||
pci_disable_pcie_error_reporting(pdev);
|
||||
#endif
|
||||
pci_disable_device(pdev);
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user