From: ZhaoLong Wang <wangzhaolong1@huawei.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: <richard@nod.at>, <vigneshr@ti.com>,
<linux-mtd@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
<chengzhihao1@huawei.com>, <yi.zhang@huawei.com>,
<yangerkun@huawei.com>
Subject: Re: [RFC] mtd: Fix error code loss in mtdchar_read() function.
Date: Mon, 25 Sep 2023 22:22:12 +0800 [thread overview]
Message-ID: <cc5c393d-c495-8f0d-9cc8-4e195c25c237@huawei.com> (raw)
In-Reply-To: <20230925104938.3f7b4284@xps-13>
> There is this comment right above, and I'm not sure it is still up to
> date because I believe many drivers just don't provide the data upon
> ECC error:
After observing the nand_base framework code, I think the current nand_base
framework can limit the length of retlen to 0 when an ECC error occurs. The
prerequisite is that the NAND driver development personnel can correctly
provide
the return value of the function according to the requirements of the
chip->ecc.read_page()
callback.
However, the read_page() callback comment does not notice the
particularity of the
following two error codes:
* -EUCLEAN - Returned by the MTD layer when maxbitflips greater then
bitflip_threshold
* -EBADMSG - Returned by NAND Generic Layer when the statistical ECC
error stats
changes and the number of retries is exhausted.
These two error codes are handled by the upper layer and should not be
returned by the
NAND driver developer. But some driver developers don't realize this.
So I don't think it's worth fixing right now, but is the description of
the return value of the
callback too simplistic? Is there any other more detailed description
document for reference?
next prev parent reply other threads:[~2023-09-25 14:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-23 0:58 ZhaoLong Wang
2023-09-25 8:49 ` Miquel Raynal
2023-09-25 9:14 ` Richard Weinberger
2023-09-25 9:28 ` Miquel Raynal
2023-09-25 9:31 ` Richard Weinberger
2023-09-25 14:22 ` ZhaoLong Wang [this message]
2023-09-25 14:03 ` Richard Weinberger
2023-09-25 14:37 ` Miquel Raynal
2023-09-25 14:59 ` Richard Weinberger
2023-09-25 15:06 ` Miquel Raynal
2023-09-26 1:08 ` ZhaoLong Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc5c393d-c495-8f0d-9cc8-4e195c25c237@huawei.com \
--to=wangzhaolong1@huawei.com \
--cc=chengzhihao1@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®