diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-04-16 14:10:18 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-28 18:13:42 -0400 |
commit | 40f562b1915937c146ffe3597b0bc627b5a996da (patch) | |
tree | 2766c834728e4be260871fe96fa8384b9372c898 /drivers/edac | |
parent | 0975c16f4fa901403708a0d3f19b33a726b10326 (diff) |
i82443bxgx_edac: convert driver to use the new edac ABI
The legacy edac ABI is going to be removed. Port the driver to use
and benefit from the new API functionality.
Cc: Tim Small <tim@buttersideup.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r-- | drivers/edac/i82443bxgx_edac.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/edac/i82443bxgx_edac.c b/drivers/edac/i82443bxgx_edac.c index 02b252acd999..524f9a2c5707 100644 --- a/drivers/edac/i82443bxgx_edac.c +++ b/drivers/edac/i82443bxgx_edac.c | |||
@@ -156,19 +156,19 @@ static int i82443bxgx_edacmc_process_error_info(struct mem_ctl_info *mci, | |||
156 | if (info->eap & I82443BXGX_EAP_OFFSET_SBE) { | 156 | if (info->eap & I82443BXGX_EAP_OFFSET_SBE) { |
157 | error_found = 1; | 157 | error_found = 1; |
158 | if (handle_errors) | 158 | if (handle_errors) |
159 | edac_mc_handle_ce(mci, page, pageoffset, | 159 | edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, |
160 | /* 440BX/GX don't make syndrome information | 160 | page, pageoffset, 0, |
161 | * available */ | 161 | edac_mc_find_csrow_by_page(mci, page), |
162 | 0, edac_mc_find_csrow_by_page(mci, page), 0, | 162 | 0, -1, mci->ctl_name, "", NULL); |
163 | mci->ctl_name); | ||
164 | } | 163 | } |
165 | 164 | ||
166 | if (info->eap & I82443BXGX_EAP_OFFSET_MBE) { | 165 | if (info->eap & I82443BXGX_EAP_OFFSET_MBE) { |
167 | error_found = 1; | 166 | error_found = 1; |
168 | if (handle_errors) | 167 | if (handle_errors) |
169 | edac_mc_handle_ue(mci, page, pageoffset, | 168 | edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, |
170 | edac_mc_find_csrow_by_page(mci, page), | 169 | page, pageoffset, 0, |
171 | mci->ctl_name); | 170 | edac_mc_find_csrow_by_page(mci, page), |
171 | 0, -1, mci->ctl_name, "", NULL); | ||
172 | } | 172 | } |
173 | 173 | ||
174 | return error_found; | 174 | return error_found; |
@@ -235,6 +235,7 @@ static void i82443bxgx_init_csrows(struct mem_ctl_info *mci, | |||
235 | static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx) | 235 | static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx) |
236 | { | 236 | { |
237 | struct mem_ctl_info *mci; | 237 | struct mem_ctl_info *mci; |
238 | struct edac_mc_layer layers[2]; | ||
238 | u8 dramc; | 239 | u8 dramc; |
239 | u32 nbxcfg, ecc_mode; | 240 | u32 nbxcfg, ecc_mode; |
240 | enum mem_type mtype; | 241 | enum mem_type mtype; |
@@ -248,8 +249,13 @@ static int i82443bxgx_edacmc_probe1(struct pci_dev *pdev, int dev_idx) | |||
248 | if (pci_read_config_dword(pdev, I82443BXGX_NBXCFG, &nbxcfg)) | 249 | if (pci_read_config_dword(pdev, I82443BXGX_NBXCFG, &nbxcfg)) |
249 | return -EIO; | 250 | return -EIO; |
250 | 251 | ||
251 | mci = edac_mc_alloc(0, I82443BXGX_NR_CSROWS, I82443BXGX_NR_CHANS, 0); | 252 | layers[0].type = EDAC_MC_LAYER_CHIP_SELECT; |
252 | 253 | layers[0].size = I82443BXGX_NR_CSROWS; | |
254 | layers[0].is_virt_csrow = true; | ||
255 | layers[1].type = EDAC_MC_LAYER_CHANNEL; | ||
256 | layers[1].size = I82443BXGX_NR_CHANS; | ||
257 | layers[1].is_virt_csrow = false; | ||
258 | mci = new_edac_mc_alloc(0, ARRAY_SIZE(layers), layers, 0); | ||
253 | if (mci == NULL) | 259 | if (mci == NULL) |
254 | return -ENOMEM; | 260 | return -ENOMEM; |
255 | 261 | ||