lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 13 Jul 2007 11:36:41 -0700 From: Andrew Morton <akpm@...ux-foundation.org> To: dougthompson@...ssion.com Cc: greg@...ah.com, alan@...rguk.ukuu.org.uk, linux-kernel@...r.kernel.org, Egor Martovetsky <egor@...emi.com> Subject: Re: [PATCH 3/8] drivers edac new pasemi driver On Fri, 13 Jul 2007 10:53:10 -0600 dougthompson@...ssion.com wrote: > From: Egor Martovetsky <egor@...emi.com> > > NEW EDAC driver for the memory controllers on PA Semi PA6T-1682M. > > Changes since last submission: > > * Rebased on top of 2.6.22-rc4-mm2 with the EDAC changes merged there. > * Minor checkpatch.pl cleanups > * Renamed ctl_name > * Added dev_name > * edac_mc.h -> edac_core.h > > ... > > +static int pasemi_edac_init_csrows(struct mem_ctl_info *mci, > + struct pci_dev *pdev, > + enum edac_type edac_mode) > +{ > + struct csrow_info *csrow; > + u32 rankcfg; > + int index; > + > + for (index = 0; index < mci->nr_csrows; index++) { > + csrow = &mci->csrows[index]; > + > + pci_read_config_dword(pdev, > + MCDRAM_RANKCFG + (index * 12), > + &rankcfg); > + > + if (!(rankcfg & MCDRAM_RANKCFG_EN)) > + continue; > + > + switch ((rankcfg & MCDRAM_RANKCFG_TYPE_SIZE_M) >> > + MCDRAM_RANKCFG_TYPE_SIZE_S) { > + case 0: > + csrow->nr_pages = 128 << (20 - PAGE_SHIFT); > + break; > + case 1: > + csrow->nr_pages = 256 << (20 - PAGE_SHIFT); > + break; > + case 2: > + case 3: > + csrow->nr_pages = 512 << (20 - PAGE_SHIFT); > + break; > + case 4: > + csrow->nr_pages = 1024 << (20 - PAGE_SHIFT); > + break; > + case 5: > + csrow->nr_pages = 2048 << (20 - PAGE_SHIFT); > + break; > + default: > + edac_mc_printk(mci, KERN_ERR, > + "Unrecognized Rank Config\n"); If this message ever comes out, you're gonna say "argh, I wish I'd printed rankcfg". Do you want to do this?? --- a/drivers/edac/pasemi_edac.c~drivers-edac-new-pasemi-driver-fix +++ a/drivers/edac/pasemi_edac.c @@ -168,7 +168,8 @@ static int pasemi_edac_init_csrows(struc break; default: edac_mc_printk(mci, KERN_ERR, - "Unrecognized Rank Config\n"); + "Unrecognized Rank Config. rankcfg=%u\n", + rankcfg); return -EINVAL; } @@ -244,9 +245,8 @@ static int __devinit pasemi_edac_probe(s */ pasemi_edac_get_error_info(mci); - if (edac_mc_add_mc(mci, system_mmc_id++)) { + if (edac_mc_add_mc(mci, system_mmc_id++)) goto fail; - } /* get this far and it's successful */ return 0; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists