From: Gabor Juhos <j4g8y7@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Mark Brown <broonie@kernel.org>,
Md Sadre Alam <quic_mdalam@quicinc.com>,
Varadarajan Narayanan <quic_varada@quicinc.com>,
Sricharan Ramabadhran <quic_srichara@quicinc.com>,
linux-spi@vger.kernel.org, linux-mtd@lists.infradead.org,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC] spi: spi-qpic-snand: overestimate corrected bitflips
Date: Mon, 26 May 2025 21:00:20 +0200 [thread overview]
Message-ID: <acca434f-30f3-4992-bcf3-e389563b356c@gmail.com> (raw)
In-Reply-To: <875xhr5r2y.fsf@bootlin.com>
2025. 05. 23. 16:39 keltezéssel, Miquel Raynal írta:
> On 22/05/2025 at 19:33:26 +02, Gabor Juhos <j4g8y7@gmail.com> wrote:
>
>> The QPIC hardware is not capable of reporting the exact number of the
>> corrected bitflips, it only reports the number of the corrected bytes.
>> However the current code treats that as corrected bitflips which is
>> quite inaccurate in most cases. For example, even if the hardware reports
>> only one byte as corrected, that byte may have contained multiple bit
>> errors from one up to the maximum number of correctable bits.
>>
>> Change the code to report the maximum of the possibly corrected bits,
>> thus allowing upper layers to do certain actions before the data gets
>> lost due to uncorrectable errors.
>>
>> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
>> ---
>> The patch tries to address Miquel's concerns [1] about the corrected bit
>> error reporting capabilities of the QPIC hardware.
>>
>> [1] https://lore.kernel.org/all/87h61e8kow.fsf@bootlin.com
>
> Thank you very much for attempting to improve the situation. Giving this
> a second look, it will not work either and will be even worse, forcing
> wear levelling after each read. So let's not change the returned value,
> hopefully the real life is different as the test case and most bitflips
> will be spread and not concentrated in a single byte. However I'd
> welcome either a pr_warn_once() or at least a comment somewhere about
> this.
Ok, I will rework the patch. If it turns out that the current approach behaves
badly in real life, we can still change it later.
Thanks,
Gabor
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2025-05-26 19:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-22 17:33 [PATCH RFC] spi: spi-qpic-snand: overestimate corrected bitflips Gabor Juhos
2025-05-23 14:39 ` Miquel Raynal
2025-05-26 19:00 ` Gabor Juhos [this message]
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=acca434f-30f3-4992-bcf3-e389563b356c@gmail.com \
--to=j4g8y7@gmail.com \
--cc=broonie@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux-spi@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=quic_mdalam@quicinc.com \
--cc=quic_srichara@quicinc.com \
--cc=quic_varada@quicinc.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