Skip to content

Commit c4a1dd9

Browse files
qzhuo2aegl
authored andcommitted
EDAC, i10nm: Check ECC enabling status per channel
The i10nm_edac only checks the ECC enabling status for the first channel of the memory controller. If there aren't memory DIMMs populated on the first channel, but at least one DIMM populated on the second channel, it will wrongly report that the ECC for the memory controller is disabled that fails to load the i10nm_edac driver. Fix it by checking ECC enabling status per channel. [Tony: Also report which channel has ECC disabled] Signed-off-by: Qiuxu Zhuo <[email protected]> Signed-off-by: Tony Luck <[email protected]>
1 parent 5c5d3ac commit c4a1dd9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/edac/i10nm_base.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ static int i10nm_get_dimm_config(struct mem_ctl_info *mci)
168168
ndimms += skx_get_nvdimm_info(dimm, imc, i, j,
169169
EDAC_MOD_STR);
170170
}
171-
if (ndimms && !i10nm_check_ecc(imc, 0)) {
172-
i10nm_printk(KERN_ERR, "ECC is disabled on imc %d\n",
173-
imc->mc);
171+
if (ndimms && !i10nm_check_ecc(imc, i)) {
172+
i10nm_printk(KERN_ERR, "ECC is disabled on imc %d channel %d\n",
173+
imc->mc, i);
174174
return -ENODEV;
175175
}
176176
}

0 commit comments

Comments
 (0)