summaryrefslogtreecommitdiffstats
path: root/drivers/edac/i3000_edac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/i3000_edac.c')
-rw-r--r--drivers/edac/i3000_edac.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
index c8418fcea254..fa4c4d48756f 100644
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -153,6 +153,7 @@ static const struct i3000_dev_info i3000_devs[] = {
static struct pci_dev *mci_pdev = NULL;
static int i3000_registered = 1;
+static struct edac_pci_ctl_info *i3000_pci;
static void i3000_get_error_info(struct mem_ctl_info *mci,
struct i3000_error_info *info)
@@ -373,6 +374,17 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
goto fail;
}
+ /* allocating generic PCI control info */
+ i3000_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR);
+ if (!i3000_pci) {
+ printk(KERN_WARNING
+ "%s(): Unable to create PCI control\n",
+ __func__);
+ printk(KERN_WARNING
+ "%s(): PCI error report via EDAC not setup\n",
+ __func__);
+ }
+
/* get this far and it's successful */
debugf3("MC: %s(): success\n", __func__);
return 0;
@@ -408,6 +420,9 @@ static void __devexit i3000_remove_one(struct pci_dev *pdev)
debugf0("%s()\n", __func__);
+ if (i3000_pci)
+ edac_pci_release_generic_ctl(i3000_pci);
+
if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL)
return;