diff options
author | Dave Peterson <dsp@llnl.gov> | 2006-03-26 04:38:45 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:07 -0500 |
commit | 749ede57443b2a7ede2db105145f21047efcea6a (patch) | |
tree | 0d0ee972f55e8fbb9d8fba6209a6304fdd3c98f1 /drivers/edac/amd76x_edac.c | |
parent | d38fde84f7521973fdfa5c3d03d62f014b42cd03 (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/amd76x_edac.c')
-rw-r--r-- | drivers/edac/amd76x_edac.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c index 6b7a441f0482..821c252d414c 100644 --- a/drivers/edac/amd76x_edac.c +++ b/drivers/edac/amd76x_edac.c | |||
@@ -211,6 +211,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) | |||
211 | }; | 211 | }; |
212 | u32 ems; | 212 | u32 ems; |
213 | u32 ems_mode; | 213 | u32 ems_mode; |
214 | struct amd76x_error_info discard; | ||
214 | 215 | ||
215 | debugf0("%s()\n", __func__); | 216 | debugf0("%s()\n", __func__); |
216 | 217 | ||
@@ -270,9 +271,7 @@ static int amd76x_probe1(struct pci_dev *pdev, int dev_idx) | |||
270 | csrow->edac_mode = ems_modes[ems_mode]; | 271 | csrow->edac_mode = ems_modes[ems_mode]; |
271 | } | 272 | } |
272 | 273 | ||
273 | /* clear counters */ | 274 | amd76x_get_error_info(mci, &discard); /* clear counters */ |
274 | pci_write_bits32(mci->pdev, AMD76X_ECC_MODE_STATUS, (u32) (0x3 << 8), | ||
275 | (u32) (0x3 << 8)); | ||
276 | 275 | ||
277 | if (edac_mc_add_mc(mci)) { | 276 | if (edac_mc_add_mc(mci)) { |
278 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); | 277 | debugf3("%s(): failed edac_mc_add_mc()\n", __func__); |