diff options
author | Hitoshi Mitake <h.mitake@gmail.com> | 2008-04-29 04:03:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:26 -0400 |
commit | c3c52bce6993c6d37af2c2de9b482a7013d646a7 (patch) | |
tree | dc03a88574a0029af51aad044c449cb90e52247f /drivers/edac/i5000_edac.c | |
parent | 1a45027d1afd7e85254b5ef8535e93ce3d588cf4 (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/i5000_edac.c')
-rw-r--r-- | drivers/edac/i5000_edac.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/edac/i5000_edac.c b/drivers/edac/i5000_edac.c index 5a852017c17a..4a16b5b61cfb 100644 --- a/drivers/edac/i5000_edac.c +++ b/drivers/edac/i5000_edac.c | |||
@@ -1286,16 +1286,6 @@ static int i5000_probe1(struct pci_dev *pdev, int dev_idx) | |||
1286 | if (PCI_FUNC(pdev->devfn) != 0) | 1286 | if (PCI_FUNC(pdev->devfn) != 0) |
1287 | return -ENODEV; | 1287 | return -ENODEV; |
1288 | 1288 | ||
1289 | /* make sure error reporting method is sane */ | ||
1290 | switch (edac_op_state) { | ||
1291 | case EDAC_OPSTATE_POLL: | ||
1292 | case EDAC_OPSTATE_NMI: | ||
1293 | break; | ||
1294 | default: | ||
1295 | edac_op_state = EDAC_OPSTATE_POLL; | ||
1296 | break; | ||
1297 | } | ||
1298 | |||
1299 | /* Ask the devices for the number of CSROWS and CHANNELS so | 1289 | /* Ask the devices for the number of CSROWS and CHANNELS so |
1300 | * that we can calculate the memory resources, etc | 1290 | * that we can calculate the memory resources, etc |
1301 | * | 1291 | * |
@@ -1478,6 +1468,9 @@ static int __init i5000_init(void) | |||
1478 | 1468 | ||
1479 | debugf2("MC: " __FILE__ ": %s()\n", __func__); | 1469 | debugf2("MC: " __FILE__ ": %s()\n", __func__); |
1480 | 1470 | ||
1471 | /* Ensure that the OPSTATE is set correctly for POLL or NMI */ | ||
1472 | opstate_init(); | ||
1473 | |||
1481 | pci_rc = pci_register_driver(&i5000_driver); | 1474 | pci_rc = pci_register_driver(&i5000_driver); |
1482 | 1475 | ||
1483 | return (pci_rc < 0) ? pci_rc : 0; | 1476 | return (pci_rc < 0) ? pci_rc : 0; |
@@ -1501,5 +1494,6 @@ MODULE_AUTHOR | |||
1501 | ("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>"); | 1494 | ("Linux Networx (http://lnxi.com) Doug Thompson <norsk5@xmission.com>"); |
1502 | MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - " | 1495 | MODULE_DESCRIPTION("MC Driver for Intel I5000 memory controllers - " |
1503 | I5000_REVISION); | 1496 | I5000_REVISION); |
1497 | |||
1504 | module_param(edac_op_state, int, 0444); | 1498 | module_param(edac_op_state, int, 0444); |
1505 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); | 1499 | MODULE_PARM_DESC(edac_op_state, "EDAC Error Reporting state: 0=Poll,1=NMI"); |