[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <acca434f-30f3-4992-bcf3-e389563b356c@gmail.com>
Date: Mon, 26 May 2025 21:00:20 +0200
From: Gabor Juhos <j4g8y7@...il.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>
Cc: Mark Brown <broonie@...nel.org>, Md Sadre Alam <quic_mdalam@...cinc.com>,
Varadarajan Narayanan <quic_varada@...cinc.com>,
Sricharan Ramabadhran <quic_srichara@...cinc.com>,
linux-spi@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] spi: spi-qpic-snand: overestimate corrected bitflips
2025. 05. 23. 16:39 keltezéssel, Miquel Raynal írta:
> On 22/05/2025 at 19:33:26 +02, Gabor Juhos <j4g8y7@...il.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@...il.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
Powered by blists - more mailing lists