EDAC: Fix incorrect edac mode reporting in sb_edac
authorMark A. Grondona <mgrondona@llnl.gov>
Tue, 18 Oct 2011 13:02:58 +0000 (11:02 -0200)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 1 Nov 2011 12:01:55 +0000 (10:01 -0200)
commitc6e13b528f5a6c6a6ae260007d4fd14c3dbc5648
tree92703334e6ed7b715d55c304735358c41e288d41
parent3d78c9af78e080db1961fd30ede1720d6e6e5999
EDAC: Fix incorrect edac mode reporting in sb_edac

The edac driver for Sandy Bridge was found to be reporting "FPM"
for edac_mode, which clearly doesn't make sense. It was found that
sb_edac.c:get_dimm_config was reusing a variable for both mem_type
and edac_type, and thus was overwriting the value after setting
it correctly. This patch fixes that issue.

Before the patch:
/sys/devices/system/edac/mc/mc0/csrow0/edac_mode:FPM
/sys/devices/system/edac/mc/mc0/csrow1/edac_mode:FPM
/sys/devices/system/edac/mc/mc0/csrow2/edac_mode:FPM
/sys/devices/system/edac/mc/mc0/csrow3/edac_mode:FPM

After:
/sys/devices/system/edac/mc/mc0/csrow0/edac_mode:S4ECD4ED
/sys/devices/system/edac/mc/mc0/csrow1/edac_mode:S4ECD4ED
/sys/devices/system/edac/mc/mc0/csrow2/edac_mode:S4ECD4ED
/sys/devices/system/edac/mc/mc0/csrow3/edac_mode:S4ECD4ED

Signed-off-by: Mark A. Grondona <mgrondona@llnl.gov>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/edac/sb_edac.c