]> rtime.felk.cvut.cz Git - can-eth-gw-linux.git/blobdiff - drivers/edac/edac_mc.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
[can-eth-gw-linux.git] / drivers / edac / edac_mc.c
index 39c75246c2aeb66fd38836f0e83f519f5f713df6..281f566a5513d907fefc67da9237a2ec41ab8679 100644 (file)
@@ -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 */