* [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability
@ 2025-05-27 11:08 Gabor Juhos
2025-06-02 15:50 ` Mark Brown
2025-06-18 9:12 ` Miquel Raynal
0 siblings, 2 replies; 4+ messages in thread
From: Gabor Juhos @ 2025-05-27 11:08 UTC (permalink / raw)
To: Mark Brown, Miquel Raynal
Cc: Md Sadre Alam, Varadarajan Narayanan, Sricharan Ramabadhran,
linux-spi, linux-mtd, linux-arm-msm, linux-kernel, Gabor Juhos
The QPIC hardware is not capable of reporting the exact number of the
corrected bit errors, it only reports the number of the corrected bytes.
Document this behaviour in the code, and also issue a warning message
to inform the user about it.
No functional changes.
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
---
drivers/spi/spi-qpic-snand.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/spi/spi-qpic-snand.c b/drivers/spi/spi-qpic-snand.c
index fd129650434f0129e24d3bdac7e7c4d5542627e6..c2f5ef899f6a60ad98b9d754b7cac1832d0500eb 100644
--- a/drivers/spi/spi-qpic-snand.c
+++ b/drivers/spi/spi-qpic-snand.c
@@ -639,6 +639,20 @@ static int qcom_spi_check_error(struct qcom_nand_controller *snandc)
unsigned int stat;
stat = buffer & BS_CORRECTABLE_ERR_MSK;
+
+ /*
+ * The exact number of the corrected bits is
+ * unknown because the hardware only reports the
+ * number of the corrected bytes.
+ *
+ * Since we have no better solution at the moment,
+ * report that value as the number of bit errors
+ * despite that it is inaccurate in most cases.
+ */
+ if (stat && stat != ecc_cfg->strength)
+ dev_warn_once(snandc->dev,
+ "Warning: due to hw limitation, the reported number of the corrected bits may be inaccurate\n");
+
snandc->qspi->ecc_stats.corrected += stat;
max_bitflips = max(max_bitflips, stat);
}
---
base-commit: b00d6864a4c948529dc6ddd2df76bf175bf27c63
change-id: 20250527-qpic-snand-limited-biterr-caps-a198b01c1f0a
Best regards,
--
Gabor Juhos <j4g8y7@gmail.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability
2025-05-27 11:08 [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability Gabor Juhos
@ 2025-06-02 15:50 ` Mark Brown
2025-06-18 9:12 ` Miquel Raynal
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2025-06-02 15:50 UTC (permalink / raw)
To: Miquel Raynal, Gabor Juhos
Cc: Md Sadre Alam, Varadarajan Narayanan, Sricharan Ramabadhran,
linux-spi, linux-mtd, linux-arm-msm, linux-kernel
On Tue, 27 May 2025 13:08:16 +0200, Gabor Juhos wrote:
> The QPIC hardware is not capable of reporting the exact number of the
> corrected bit errors, it only reports the number of the corrected bytes.
>
> Document this behaviour in the code, and also issue a warning message
> to inform the user about it.
>
> No functional changes.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next
Thanks!
[1/1] spi: spi-qpic-snand: document the limited bit error reporting capability
commit: 57cf46cd1fe351846e1b065ca9546eef66675ecd
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability
2025-05-27 11:08 [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability Gabor Juhos
2025-06-02 15:50 ` Mark Brown
@ 2025-06-18 9:12 ` Miquel Raynal
2025-06-18 15:37 ` Gabor Juhos
1 sibling, 1 reply; 4+ messages in thread
From: Miquel Raynal @ 2025-06-18 9:12 UTC (permalink / raw)
To: Gabor Juhos
Cc: Mark Brown, Md Sadre Alam, Varadarajan Narayanan,
Sricharan Ramabadhran, linux-spi, linux-mtd, linux-arm-msm,
linux-kernel
Hi Gabor,
On 27/05/2025 at 13:08:16 +02, Gabor Juhos <j4g8y7@gmail.com> wrote:
> The QPIC hardware is not capable of reporting the exact number of the
> corrected bit errors, it only reports the number of the corrected bytes.
>
> Document this behaviour in the code, and also issue a warning message
> to inform the user about it.
>
> No functional changes.
>
> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
This change no longer applies on v6.16-rc1, can you please rebase and
resend?
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability
2025-06-18 9:12 ` Miquel Raynal
@ 2025-06-18 15:37 ` Gabor Juhos
0 siblings, 0 replies; 4+ messages in thread
From: Gabor Juhos @ 2025-06-18 15:37 UTC (permalink / raw)
To: Miquel Raynal
Cc: Mark Brown, Md Sadre Alam, Varadarajan Narayanan,
Sricharan Ramabadhran, linux-spi, linux-mtd, linux-arm-msm,
linux-kernel
Hi Miquel,
> On 27/05/2025 at 13:08:16 +02, Gabor Juhos <j4g8y7@gmail.com> wrote:
>
>> The QPIC hardware is not capable of reporting the exact number of the
>> corrected bit errors, it only reports the number of the corrected bytes.
>>
>> Document this behaviour in the code, and also issue a warning message
>> to inform the user about it.
>>
>> No functional changes.
>>
>> Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
>
> This change no longer applies on v6.16-rc1, can you please rebase and
> resend?
It is not needed since v6.16-rc1 contains the change already (57cf46cd1fe3).
Regars,
Gabor
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-18 15:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-27 11:08 [PATCH] spi: spi-qpic-snand: document the limited bit error reporting capability Gabor Juhos
2025-06-02 15:50 ` Mark Brown
2025-06-18 9:12 ` Miquel Raynal
2025-06-18 15:37 ` Gabor Juhos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).