summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/emulex
diff options
context:
space:
mode:
authorSathya Perla <sathya.perla@emulex.com>2012-09-05 01:56:48 +0000
committerDavid S. Miller <davem@davemloft.net>2012-09-05 17:49:28 -0400
commitd6b6d987787876fd381bfeda310c6682d425c0a2 (patch)
tree0333171570e9abc2c1a2a8d4e3e5358b6820371e /drivers/net/ethernet/emulex
parent23d3b8bfb8eb20e7d96afa09991e6a5ed1c83164 (diff)
downloadlinux-stable-d6b6d987787876fd381bfeda310c6682d425c0a2.tar.gz
linux-stable-d6b6d987787876fd381bfeda310c6682d425c0a2.tar.bz2
linux-stable-d6b6d987787876fd381bfeda310c6682d425c0a2.zip
be2net: use PCIe AER capability
This patch allows code to handle the PCIe AER capability. The PCI callbacks for error handling/reset/recovery already exist in be2net and have been tested with EEH/ppc. This patch has been tested using the aer-inject tool. Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/emulex')
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 111dc8813f68..84379f4fe837 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -20,6 +20,7 @@
#include "be.h"
#include "be_cmds.h"
#include <asm/div64.h>
+#include <linux/aer.h>
MODULE_VERSION(DRV_VER);
MODULE_DEVICE_TABLE(pci, be_dev_ids);
@@ -3551,6 +3552,8 @@ static void __devexit be_remove(struct pci_dev *pdev)
be_ctrl_cleanup(adapter);
+ pci_disable_pcie_error_reporting(pdev);
+
pci_set_drvdata(pdev, NULL);
pci_release_regions(pdev);
pci_disable_device(pdev);
@@ -3846,6 +3849,10 @@ static int __devinit be_probe(struct pci_dev *pdev,
}
}
+ status = pci_enable_pcie_error_reporting(pdev);
+ if (status)
+ dev_err(&pdev->dev, "Could not use PCIe error reporting\n");
+
status = be_ctrl_init(adapter);
if (status)
goto free_netdev;
@@ -4068,6 +4075,7 @@ static pci_ers_result_t be_eeh_reset(struct pci_dev *pdev)
if (status)
return PCI_ERS_RESULT_DISCONNECT;
+ pci_cleanup_aer_uncorrect_error_status(pdev);
return PCI_ERS_RESULT_RECOVERED;
}