summaryrefslogtreecommitdiffstats
path: root/drivers/edac/r82600_edac.c
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 11:38:45 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 18:57:07 +0200
commit749ede57443b2a7ede2db105145f21047efcea6a (patch)
tree0d0ee972f55e8fbb9d8fba6209a6304fdd3c98f1 /drivers/edac/r82600_edac.c
parent[PATCH] EDAC: e7xxx fix minor logic bug (diff)
downloadlinux-749ede57443b2a7ede2db105145f21047efcea6a.tar.xz
linux-749ede57443b2a7ede2db105145f21047efcea6a.zip
[PATCH] EDAC: cleanup code for clearing initial errors
Fix xxx_probe1() functions so they call xxx_get_error_info() functions to clear initial errors. This is simpler and cleaner than duplicating the low-level code for accessing PCI config space. Signed-off-by: David S. Peterson <dsp@llnl.gov> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/edac/r82600_edac.c')
-rw-r--r--drivers/edac/r82600_edac.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index ac1359828e78..787a7652c7ef 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -219,7 +219,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
u32 scrub_disabled;
u32 sdram_refresh_rate;
u32 row_high_limit_last = 0;
- u32 eap_init_bits;
+ struct r82600_error_info discard;
debugf0("%s()\n", __func__);
@@ -311,8 +311,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
row_high_limit_last = row_high_limit;
}
- /* clear counters */
- /* FIXME should we? */
+ r82600_get_error_info(mci, &discard); /* clear counters */
if (edac_mc_add_mc(mci)) {
debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
@@ -321,19 +320,12 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
/* get this far and it's successful */
- /* Clear error flags to allow next error to be reported [p.62] */
- /* Test systems seem to always have the UE flag raised on boot */
-
- eap_init_bits = BIT(0) & BIT(1);
if (disable_hardware_scrub) {
- eap_init_bits |= BIT(31);
debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n",
__func__);
+ pci_write_bits32(mci->pdev, R82600_EAP, BIT(31), BIT(31));
}
- pci_write_bits32(mci->pdev, R82600_EAP, eap_init_bits,
- eap_init_bits);
-
debugf3("%s(): success\n", __func__);
return 0;