[PATCH 4/4] mtd: rawnand: Clarify conditions to enable continuous reads
Miquel Raynal
miquel.raynal at bootlin.com
Wed Feb 21 03:20:32 PST 2024
Hi Christophe,
christophe.kerello at foss.st.com wrote on Fri, 9 Feb 2024 14:35:44 +0100:
> Hi Miquel,
>
> I am testing last nand/next branch with the MP1 board, and i get an issue since this patch was applied.
>
> When I read the SLC NAND using nandump tool (reading page 0 and page 1), the OOB is not displayed at expected. For page 1, oob is displayed when for page 0 the first data of the page are displayed.
>
> The nanddump command used is: nanddump -c -o -l 0x2000 /dev/mtd9
I believe the issue is not in the indexes but related to the OOB. I
currently test on a device on which I would prefer not to smash the
content, so this is just compile tested and not run time verified, but
could you tell me if this solves the issue:
--- a/drivers/mtd/nand/raw/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
@@ -3577,7 +3577,8 @@ static int nand_do_read_ops(struct nand_chip *chip, loff_t from,
oob = ops->oobbuf;
oob_required = oob ? 1 : 0;
- rawnand_enable_cont_reads(chip, page, readlen, col);
+ if (!oob_required)
+ rawnand_enable_cont_reads(chip, page, readlen, col);
while (1) {
struct mtd_ecc_stats ecc_stats = mtd->ecc_stats;
If that does not work, I'll destroy the content of the flash and
properly reproduce.
Thanks,
Miquèl
More information about the linux-mtd
mailing list