diff options
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/pasemi_edac.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/edac/pasemi_edac.c b/drivers/edac/pasemi_edac.c index 3fcefda653fd..46aed62436b5 100644 --- a/drivers/edac/pasemi_edac.c +++ b/drivers/edac/pasemi_edac.c | |||
@@ -110,15 +110,16 @@ static void pasemi_edac_process_error_info(struct mem_ctl_info *mci, u32 errsta) | |||
110 | /* uncorrectable/multi-bit errors */ | 110 | /* uncorrectable/multi-bit errors */ |
111 | if (errsta & (MCDEBUG_ERRSTA_MBE_STATUS | | 111 | if (errsta & (MCDEBUG_ERRSTA_MBE_STATUS | |
112 | MCDEBUG_ERRSTA_RFL_STATUS)) { | 112 | MCDEBUG_ERRSTA_RFL_STATUS)) { |
113 | edac_mc_handle_ue(mci, mci->csrows[cs].first_page, 0, | 113 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, |
114 | cs, mci->ctl_name); | 114 | mci->csrows[cs].first_page, 0, 0, |
115 | cs, 0, -1, mci->ctl_name, "", NULL); | ||
115 | } | 116 | } |
116 | 117 | ||
117 | /* correctable/single-bit errors */ | 118 | /* correctable/single-bit errors */ |
118 | if (errsta & MCDEBUG_ERRSTA_SBE_STATUS) { | 119 | if (errsta & MCDEBUG_ERRSTA_SBE_STATUS) |
119 | edac_mc_handle_ce(mci, mci->csrows[cs].first_page, 0, | 120 | edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, |
120 | 0, cs, 0, mci->ctl_name); | 121 | mci->csrows[cs].first_page, 0, 0, |
121 | } | 122 | cs, 0, -1, mci->ctl_name, "", NULL); |
122 | } | 123 | } |
123 | 124 | ||
124 | static void pasemi_edac_check(struct mem_ctl_info *mci) | 125 | static void pasemi_edac_check(struct mem_ctl_info *mci) |
@@ -191,6 +192,7 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev, | |||
191 | const struct pci_device_id *ent) | 192 | const struct pci_device_id *ent) |
192 | { | 193 | { |
193 | struct mem_ctl_info *mci = NULL; | 194 | struct mem_ctl_info *mci = NULL; |
195 | struct edac_mc_layer layers[2]; | ||
194 | u32 errctl1, errcor, scrub, mcen; | 196 | u32 errctl1, errcor, scrub, mcen; |
195 | 197 | ||
196 | pci_read_config_dword(pdev, MCCFG_MCEN, &mcen); | 198 | pci_read_config_dword(pdev, MCCFG_MCEN, &mcen); |
@@ -207,9 +209,14 @@ static int __devinit pasemi_edac_probe(struct pci_dev *pdev, | |||
207 | MCDEBUG_ERRCTL1_RFL_LOG_EN; | 209 | MCDEBUG_ERRCTL1_RFL_LOG_EN; |
208 | pci_write_config_dword(pdev, MCDEBUG_ERRCTL1, errctl1); | 210 | pci_write_config_dword(pdev, MCDEBUG_ERRCTL1, errctl1); |
209 | 211 | ||
210 | mci = edac_mc_alloc(0, PASEMI_EDAC_NR_CSROWS, PASEMI_EDAC_NR_CHANS, | 212 | layers[0].type = EDAC_MC_LAYER_CHIP_SELECT; |
211 | system_mmc_id++); | 213 | layers[0].size = PASEMI_EDAC_NR_CSROWS; |
212 | 214 | layers[0].is_virt_csrow = true; | |
215 | layers[1].type = EDAC_MC_LAYER_CHANNEL; | ||
216 | layers[1].size = PASEMI_EDAC_NR_CHANS; | ||
217 | layers[1].is_virt_csrow = false; | ||
218 | mci = new_edac_mc_alloc(system_mmc_id++, ARRAY_SIZE(layers), layers, | ||
219 | 0); | ||
213 | if (mci == NULL) | 220 | if (mci == NULL) |
214 | return -ENOMEM; | 221 | return -ENOMEM; |
215 | 222 | ||