aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/i3000_edac.c
diff options
context:
space:
mode:
authorHitoshi Mitake <h.mitake@gmail.com>2008-04-29 04:03:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 11:06:26 -0400
commitc3c52bce6993c6d37af2c2de9b482a7013d646a7 (patch)
treedc03a88574a0029af51aad044c449cb90e52247f /drivers/edac/i3000_edac.c
parent1a45027d1afd7e85254b5ef8535e93ce3d588cf4 (diff)
edac: fix module initialization on several modules 2nd time
I implemented opstate_init() as a inline function in linux/edac.h. added calling opstate_init() to: i82443bxgx_edac.c i82860_edac.c i82875p_edac.c i82975x_edac.c I wrote a fixed patch of edac-fix-module-initialization-on-several-modules.patch, and tested building 2.6.25-rc7 with applying this. It was succeed. I think the patch is now correct. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com> Signed-off-by: Doug Thompson <dougthompson@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/edac/i3000_edac.c')
-rw-r--r--drivers/edac/i3000_edac.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/edac/i3000_edac.c b/drivers/edac/i3000_edac.c
index 5d4292811c14..6c9a0f2a593c 100644
--- a/drivers/edac/i3000_edac.c
+++ b/drivers/edac/i3000_edac.c
@@ -326,15 +326,6 @@ static int i3000_probe1(struct pci_dev *pdev, int dev_idx)
326 return -ENODEV; 326 return -ENODEV;
327 } 327 }
328 328
329 switch (edac_op_state) {
330 case EDAC_OPSTATE_POLL:
331 case EDAC_OPSTATE_NMI:
332 break;
333 default:
334 edac_op_state = EDAC_OPSTATE_POLL;
335 break;
336 }
337
338 c0dra[0] = readb(window + I3000_C0DRA + 0); /* ranks 0,1 */ 329 c0dra[0] = readb(window + I3000_C0DRA + 0); /* ranks 0,1 */
339 c0dra[1] = readb(window + I3000_C0DRA + 1); /* ranks 2,3 */ 330 c0dra[1] = readb(window + I3000_C0DRA + 1); /* ranks 2,3 */
340 c1dra[0] = readb(window + I3000_C1DRA + 0); /* ranks 0,1 */ 331 c1dra[0] = readb(window + I3000_C1DRA + 0); /* ranks 0,1 */
@@ -503,6 +494,10 @@ static int __init i3000_init(void)
503 int pci_rc; 494 int pci_rc;
504 495
505 debugf3("MC: %s()\n", __func__); 496 debugf3("MC: %s()\n", __func__);
497
498 /* Ensure that the OPSTATE is set correctly for POLL or NMI */
499 opstate_init();
500
506 pci_rc = pci_register_driver(&i3000_driver); 501 pci_rc = pci_register_driver(&i3000_driver);
507 if (pci_rc < 0) 502 if (pci_rc < 0)
508 goto fail0; 503 goto fail0;