aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/r82600_edac.c
diff options
context:
space:
mode:
authorDave Peterson <dsp@llnl.gov>2006-03-26 04:38:45 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:07 -0500
commit749ede57443b2a7ede2db105145f21047efcea6a (patch)
tree0d0ee972f55e8fbb9d8fba6209a6304fdd3c98f1 /drivers/edac/r82600_edac.c
parentd38fde84f7521973fdfa5c3d03d62f014b42cd03 (diff)
[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)
219 u32 scrub_disabled; 219 u32 scrub_disabled;
220 u32 sdram_refresh_rate; 220 u32 sdram_refresh_rate;
221 u32 row_high_limit_last = 0; 221 u32 row_high_limit_last = 0;
222 u32 eap_init_bits; 222 struct r82600_error_info discard;
223 223
224 debugf0("%s()\n", __func__); 224 debugf0("%s()\n", __func__);
225 225
@@ -311,8 +311,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
311 row_high_limit_last = row_high_limit; 311 row_high_limit_last = row_high_limit;
312 } 312 }
313 313
314 /* clear counters */ 314 r82600_get_error_info(mci, &discard); /* clear counters */
315 /* FIXME should we? */
316 315
317 if (edac_mc_add_mc(mci)) { 316 if (edac_mc_add_mc(mci)) {
318 debugf3("%s(): failed edac_mc_add_mc()\n", __func__); 317 debugf3("%s(): failed edac_mc_add_mc()\n", __func__);
@@ -321,19 +320,12 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
321 320
322 /* get this far and it's successful */ 321 /* get this far and it's successful */
323 322
324 /* Clear error flags to allow next error to be reported [p.62] */
325 /* Test systems seem to always have the UE flag raised on boot */
326
327 eap_init_bits = BIT(0) & BIT(1);
328 if (disable_hardware_scrub) { 323 if (disable_hardware_scrub) {
329 eap_init_bits |= BIT(31);
330 debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n", 324 debugf3("%s(): Disabling Hardware Scrub (scrub on error)\n",
331 __func__); 325 __func__);
326 pci_write_bits32(mci->pdev, R82600_EAP, BIT(31), BIT(31));
332 } 327 }
333 328
334 pci_write_bits32(mci->pdev, R82600_EAP, eap_init_bits,
335 eap_init_bits);
336
337 debugf3("%s(): success\n", __func__); 329 debugf3("%s(): success\n", __func__);
338 return 0; 330 return 0;
339 331