diff options
Diffstat (limited to 'drivers/edac/i5000_edac.c')
-rw-r--r-- | drivers/edac/i5000_edac.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index aa05c45efc08..4b4ec978df2c 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
@@ -28,6 +28,7 @@ | |||
28 | * Alter this version for the I5000 module when modifications are made | 28 | * Alter this version for the I5000 module when modifications are made |
29 | */ | 29 | */ |
30 | #define I5000_REVISION " Ver: 2.0.12 " __DATE__ | 30 | #define I5000_REVISION " Ver: 2.0.12 " __DATE__ |
31 | #define EDAC_MOD_STR "i5000_edac" | ||
31 | 32 | ||
32 | #define i5000_printk(level, fmt, arg...) \ | 33 | #define i5000_printk(level, fmt, arg...) \ |
33 | edac_printk(level, "i5000", fmt, ##arg) | 34 | edac_printk(level, "i5000", fmt, ##arg) |
@@ -381,6 +382,8 @@ struct i5000_error_info { | |||
381 | 382 | ||
382 | }; | 383 | }; |
383 | 384 | ||
385 | static struct edac_pci_ctl_info *i5000_pci; | ||
386 | |||
384 | /****************************************************************************** | 387 | /****************************************************************************** |
385 | * i5000_get_error_info Retrieve the hardware error information from | 388 | * i5000_get_error_info Retrieve the hardware error information from |
386 | * the hardware and cache it in the 'info' | 389 | * the hardware and cache it in the 'info' |
@@ -1375,6 +1378,17 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1375 | 1378 | ||
1376 | i5000_clear_error(mci); | 1379 | i5000_clear_error(mci); |
1377 | 1380 | ||
1381 | /* allocating generic PCI control info */ | ||
1382 | i5000_pci = edac_pci_create_generic_ctl(&pdev->dev, EDAC_MOD_STR); | ||
1383 | if (!i5000_pci) { | ||
1384 | printk(KERN_WARNING | ||
1385 | "%s(): Unable to create PCI control\n", | ||
1386 | __func__); | ||
1387 | printk(KERN_WARNING | ||
1388 | "%s(): PCI error report via EDAC not setup\n", | ||
1389 | __func__); | ||
1390 | } | ||
1391 | |||
1378 | return 0; | 1392 | return 0; |
1379 | 1393 | ||
1380 | /* Error exit unwinding stack */ | 1394 | /* Error exit unwinding stack */ |
@@ -1420,6 +1434,9 @@ static void __devexit i5000_remove_one(struct pci_dev *pdev) | |||
1420 | 1434 | ||
1421 | debugf0(__FILE__ ": %s()\n", __func__); | 1435 | debugf0(__FILE__ ": %s()\n", __func__); |
1422 | 1436 | ||
1437 | if (i5000_pci) | ||
1438 | edac_pci_release_generic_ctl(i5000_pci); | ||
1439 | |||
1423 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) | 1440 | if ((mci = edac_mc_del_mc(&pdev->dev)) == NULL) |
1424 | return; | 1441 | return; |
1425 | 1442 | ||