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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20211015113741.30712544@xps13>
Date:   Fri, 15 Oct 2021 11:37:41 +0200
From:   Miquel Raynal <miquel.raynal@...tlin.com>
To:     "xiangsheng.hou" <xiangsheng.hou@...iatek.com>
Cc:     Richard Weinberger <richard@....at>,
        Vignesh Raghavendra <vigneshr@...com>,
        Tudor Ambarus <Tudor.Ambarus@...rochip.com>,
        <linux-mtd@...ts.infradead.org>, Rob Herring <robh+dt@...nel.org>,
        Mark Brown <broonie@...nel.org>,
        "Boris Brezillon" <bbrezillon@...nel.org>,
        <devicetree@...r.kernel.org>, <linux-spi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <jaimeliao@...c.com.tw>,
        <juliensu@...c.com.tw>,
        Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [RFC PATCH 06/10] mtd: nand: mxic-ecc: Add Macronix external
 ECC engine support

Hi xiangsheng.hou,

xiangsheng.hou@...iatek.com wrote on Wed, 13 Oct 2021 17:15:49 +0800:

> Hi,
> 
> On Fri, 2021-10-08 at 18:22 +0200, Miquel Raynal wrote:
> > 
> > +static int mxic_ecc_count_biterrs(struct mxic_ecc_engine *eng,
> > struct mtd_info *mtd)
> > +{
> > +	struct device *dev = eng->dev;
> > +	unsigned int max_bf = 0;
> > +	int step;
> > +
> > +	for (step = 0; step < eng->steps; step++) {
> > +		u8 stat = eng->status[step];
> > +
> > +		if (stat == NO_ERR) {
> > +			dev_dbg(dev, "ECC step %d: no error\n", step);
> > +		} else if (stat == ERASED_CHUNK) {
> > +			dev_dbg(dev, "ECC step %d: erased\n", step);
> > +		} else if (stat == UNCORR_ERR || stat > MAX_CORR_ERR) {
> > +			dev_dbg(dev, "ECC step %d: uncorrectable\n",
> > step);
> > +			mtd->ecc_stats.failed++;
> > +		} else {
> > +			dev_dbg(dev, "ECC step %d: %d bits
> > corrected\n",
> > +				step, stat);
> > +			max_bf = max_t(unsigned int, max_bf, stat);
> > +			mtd->ecc_stats.corrected += stat;
> > +		}
> > +	}
> > +
> > +	return max_bf;
> > +}  
> 
> In spinand_mtd_read() function, rely on the return value -EBADMSG to
> check whether ecc failed. Therefore, maybe there also need return this
> value in mxic_ecc_count_biterrs() function when uncorrectable ecc
> error?

True, I'll fix this.

Thanks,
Miquèl

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ