@@ -403,21 +403,19 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
pci_set_master(pdev);
- adf_enable_aer(accel_dev);
-
if (pci_save_state(pdev)) {
dev_err(&pdev->dev, "Failed to save pci state.\n");
ret = -ENOMEM;
- goto out_err_disable_aer;
+ goto out_err;
}
ret = adf_sysfs_init(accel_dev);
if (ret)
- goto out_err_disable_aer;
+ goto out_err;
ret = hw_data->dev_config(accel_dev);
if (ret)
- goto out_err_disable_aer;
+ goto out_err;
ret = adf_dev_init(accel_dev);
if (ret)
@@ -433,8 +431,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
adf_dev_stop(accel_dev);
out_err_dev_shutdown:
adf_dev_shutdown(accel_dev);
-out_err_disable_aer:
- adf_disable_aer(accel_dev);
out_err:
adf_cleanup_accel(accel_dev);
return ret;
@@ -450,7 +446,6 @@ static void adf_remove(struct pci_dev *pdev)
}
adf_dev_stop(accel_dev);
adf_dev_shutdown(accel_dev);
- adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev);
}
@@ -193,17 +193,15 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
pci_set_master(pdev);
- adf_enable_aer(accel_dev);
-
if (pci_save_state(pdev)) {
dev_err(&pdev->dev, "Failed to save pci state\n");
ret = -ENOMEM;
- goto out_err_disable_aer;
+ goto out_err_free_reg;
}
ret = hw_data->dev_config(accel_dev);
if (ret)
- goto out_err_disable_aer;
+ goto out_err_free_reg;
ret = adf_dev_init(accel_dev);
if (ret)
@@ -219,8 +217,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
adf_dev_stop(accel_dev);
out_err_dev_shutdown:
adf_dev_shutdown(accel_dev);
-out_err_disable_aer:
- adf_disable_aer(accel_dev);
out_err_free_reg:
pci_release_regions(accel_pci_dev->pci_dev);
out_err_disable:
@@ -241,7 +237,6 @@ static void adf_remove(struct pci_dev *pdev)
}
adf_dev_stop(accel_dev);
adf_dev_shutdown(accel_dev);
- adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev);
adf_cleanup_pci_dev(accel_dev);
kfree(accel_dev);
@@ -193,17 +193,15 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
pci_set_master(pdev);
- adf_enable_aer(accel_dev);
-
if (pci_save_state(pdev)) {
dev_err(&pdev->dev, "Failed to save pci state\n");
ret = -ENOMEM;
- goto out_err_disable_aer;
+ goto out_err_free_reg;
}
ret = hw_data->dev_config(accel_dev);
if (ret)
- goto out_err_disable_aer;
+ goto out_err_free_reg;
ret = adf_dev_init(accel_dev);
if (ret)
@@ -219,8 +217,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
adf_dev_stop(accel_dev);
out_err_dev_shutdown:
adf_dev_shutdown(accel_dev);
-out_err_disable_aer:
- adf_disable_aer(accel_dev);
out_err_free_reg:
pci_release_regions(accel_pci_dev->pci_dev);
out_err_disable:
@@ -241,7 +237,6 @@ static void adf_remove(struct pci_dev *pdev)
}
adf_dev_stop(accel_dev);
adf_dev_shutdown(accel_dev);
- adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev);
adf_cleanup_pci_dev(accel_dev);
kfree(accel_dev);
@@ -2,7 +2,6 @@
/* Copyright(c) 2014 - 2020 Intel Corporation */
#include <linux/kernel.h>
#include <linux/pci.h>
-#include <linux/aer.h>
#include <linux/completion.h>
#include <linux/workqueue.h>
#include <linux/delay.h>
@@ -173,40 +172,6 @@ const struct pci_error_handlers adf_err_handler = {
};
EXPORT_SYMBOL_GPL(adf_err_handler);
-/**
- * adf_enable_aer() - Enable Advance Error Reporting for acceleration device
- * @accel_dev: Pointer to acceleration device.
- *
- * Function enables PCI Advance Error Reporting for the
- * QAT acceleration device accel_dev.
- * To be used by QAT device specific drivers.
- */
-void adf_enable_aer(struct adf_accel_dev *accel_dev)
-{
- struct pci_dev *pdev = accel_to_pci_dev(accel_dev);
-
- pci_enable_pcie_error_reporting(pdev);
-}
-EXPORT_SYMBOL_GPL(adf_enable_aer);
-
-/**
- * adf_disable_aer() - Disable Advance Error Reporting for acceleration device
- * @accel_dev: Pointer to acceleration device.
- *
- * Function disables PCI Advance Error Reporting for the
- * QAT acceleration device accel_dev.
- * To be used by QAT device specific drivers.
- *
- * Return: void
- */
-void adf_disable_aer(struct adf_accel_dev *accel_dev)
-{
- struct pci_dev *pdev = accel_to_pci_dev(accel_dev);
-
- pci_disable_pcie_error_reporting(pdev);
-}
-EXPORT_SYMBOL_GPL(adf_disable_aer);
-
int adf_init_aer(void)
{
device_reset_wq = alloc_workqueue("qat_device_reset_wq",
@@ -88,8 +88,6 @@ int adf_ae_start(struct adf_accel_dev *accel_dev);
int adf_ae_stop(struct adf_accel_dev *accel_dev);
extern const struct pci_error_handlers adf_err_handler;
-void adf_enable_aer(struct adf_accel_dev *accel_dev);
-void adf_disable_aer(struct adf_accel_dev *accel_dev);
void adf_reset_sbr(struct adf_accel_dev *accel_dev);
void adf_reset_flr(struct adf_accel_dev *accel_dev);
void adf_dev_restore(struct adf_accel_dev *accel_dev);
@@ -193,17 +193,15 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
}
pci_set_master(pdev);
- adf_enable_aer(accel_dev);
-
if (pci_save_state(pdev)) {
dev_err(&pdev->dev, "Failed to save pci state\n");
ret = -ENOMEM;
- goto out_err_disable_aer;
+ goto out_err_free_reg;
}
ret = hw_data->dev_config(accel_dev);
if (ret)
- goto out_err_disable_aer;
+ goto out_err_free_reg;
ret = adf_dev_init(accel_dev);
if (ret)
@@ -219,8 +217,6 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
adf_dev_stop(accel_dev);
out_err_dev_shutdown:
adf_dev_shutdown(accel_dev);
-out_err_disable_aer:
- adf_disable_aer(accel_dev);
out_err_free_reg:
pci_release_regions(accel_pci_dev->pci_dev);
out_err_disable:
@@ -241,7 +237,6 @@ static void adf_remove(struct pci_dev *pdev)
}
adf_dev_stop(accel_dev);
adf_dev_shutdown(accel_dev);
- adf_disable_aer(accel_dev);
adf_cleanup_accel(accel_dev);
adf_cleanup_pci_dev(accel_dev);
kfree(accel_dev);