summaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-03 11:16:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-03 11:16:37 -0800
commitb52c6402b5b42620571c36c74a12dcb45ec1e0d6 (patch)
treef3a63dda44a3bf5d1568ef2d30caee11237c1c78 /drivers/edac/edac_mc.c
parent4ba0032984fd2626209c6aef0ee025912875bf9f (diff)
parent42709efb3a47524c6252e1bdc85e205f7bc356fb (diff)
downloadlinux-b52c6402b5b42620571c36c74a12dcb45ec1e0d6.tar.bz2
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac
Pull EDAC fixes from Mauro Carvalho Chehab: "One EDAC core fix, and a few driver fixes (i7300, i9275x, i7core)." * git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-edac: i7core_edac: fix panic when accessing sysfs files i7300_edac: Fix error flag testing edac: Fix the dimm filling for csrows-based layouts i82975x_edac: Fix dimm label initialization
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r--drivers/edac/edac_mc.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 90f0b730e9bb..75c0a1a85fc3 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -416,10 +416,18 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
dimm->cschannel = chn;
/* Increment csrow location */
- row++;
- if (row == tot_csrows) {
- row = 0;
+ if (layers[0].is_virt_csrow) {
chn++;
+ if (chn == tot_channels) {
+ chn = 0;
+ row++;
+ }
+ } else {
+ row++;
+ if (row == tot_csrows) {
+ row = 0;
+ chn++;
+ }
}
/* Increment dimm location */