]> err.no Git - linux-2.6/blobdiff - drivers/edac/r82600_edac.c
[PATCH] EDAC: edac_mc_add_mc fix [2/2]
[linux-2.6] / drivers / edac / r82600_edac.c
index 27d16dc2f11d423927d1c95fbaf167fa4cc7724c..787a7652c7ef94e0cbd390530015ede2dcf692cb 100644 (file)
@@ -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__);
 
@@ -265,7 +265,7 @@ static int r82600_probe1(struct pci_dev *pdev, int dev_idx)
        } else
                mci->edac_cap = EDAC_FLAG_NONE;
 
-       mci->mod_name = BS_MOD_STR;
+       mci->mod_name = EDAC_MOD_STR;
        mci->mod_ver = "$Revision: 1.1.2.6 $";
        mci->ctl_name = "R82600";
        mci->edac_check = r82600_check;
@@ -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;
 
@@ -376,7 +368,7 @@ MODULE_DEVICE_TABLE(pci, r82600_pci_tbl);
 
 
 static struct pci_driver r82600_driver = {
-       .name = BS_MOD_STR,
+       .name = EDAC_MOD_STR,
        .probe = r82600_init_one,
        .remove = __devexit_p(r82600_remove_one),
        .id_table = r82600_pci_tbl,