mtd: OneNAND: fix bufferram management.
cover mtd: OneNAND: fix bufferram management.
Hello,
Have a look at this patch, I've some problems with latest kernel from mainline and a JFFS2 filesystem, the kernel reports various errors like
Header CRC failed on REF_PRISTINE node at 0x1e81315c: Read 0x000000e0, calculated 0x564fc9e8
Applying this patch solves the issue, but I only have tested on IGEP v2 board with a OneNAND from Numonyx. Please test with other OneNAND devices and point me if I'm in the correct way to solve this issue. Thanks.
Cheers,
Enric
$ git diff --stat origin/master drivers/mtd/onenand/onenand_base.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
PATCH 1/1 mtd: OneNAND: fix bufferram management when chip has 2-planes.
This patch adds code that I think was lost when it was applied the commit
5988af2319781bc8e0ce418affec4e09cfa77907 - mtd: Flex-OneNAND support
Test case:
1. Stress a jffs2 filesystem using
bonnie++ -u 0:0 -s 32 -m 16 -r 16
2. dmesg shows various 'Header CRC failed' errors like:
Header CRC failed on REF_PRISTINE node at 0x1e81315c: Read 0x000000e0,
calculated 0x564fc9e8Tested on IGEP v2 board with a Muxed OneNAND(DDP) 512MB 1.8V 16-bit (0x58) with 2 planes from Numonyx and CONFIG_MTD_ONENAND_2X_PROGRAM set to y
--- drivers/mtd/onenand/onenand_base.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
drivers/mtd/onenand/onenand_base.c +4 -0
@@ -1964,6 +1964,10 @@ static int onenand_write_ops_nolock(struct mtd_info *mtd, loff_t to,/* In partial page write we don't update bufferram */ onenand_update_bufferram (mtd, to, !ret && !subpage); +ONENAND_SET_BUFFERRAM1 (this); +onenand_update_bufferram (mtd, to + this->writesize, + !ret && !subpage); +if (ret) {printk (KERN_ERR "%s: write failed %d\n" , __func__, ret);
Signature · 1 line
1.7.1
Re: [PATCH 1/1] mtd: OneNAND: fix bufferram management when chip has 2-planes.
Quoted 10 lines · Enric Balletbo i Serra
This patch adds code that I think was lost when it was applied the commit
5988af2319781bc8e0ce418affec4e09cfa77907- mtd: Flex-OneNAND supportTest case:
1. Stress a jffs2 filesystem usingbonnie++ -u 0:0 -s 32 -m 16 -r 16 2. dmesg shows various 'Header CRC failed' errors like: Header CRC failed on REF_PRISTINE node at 0x1e81315c: Read 0x000000e0, calculated 0x564fc9e8
Quoted 4 lines
Tested on IGEP v2 board with a Muxed OneNAND(DDP) 512MB 1.8V 16-bit (
0x58) with 2 planes from Numonyx andCONFIG_MTD_ONENAND_2X_PROGRAMset to ySigned-off-by Enric Balletbo i Serra <[email protected]>
Kyungmin, would be nice to have your ack/nack.
Signature · 2 lines
Best Regards, Artem Bityutskiy (Артём Битюцкий)
Re: [PATCH 1/1] mtd: OneNAND: fix bufferram management when chip has 2-planes.
Quoted 11 lines · Artem Bityutskiy
Quoted 10 lines · Enric Balletbo i Serra
This patch adds code that I think was lost when it was applied the commit
5988af2319781bc8e0ce418affec4e09cfa77907- mtd: Flex-OneNAND supportTest case:
1. Stress a jffs2 filesystem using
bonnie++ -u 0:0 -s 32 -m 16 -r 16
2. dmesg shows various 'Header CRC failed' errors like:
Header CRC failed onREF_PRISTINEnode at0x1e81315c: Read0x000000e0, calculated0x564fc9e8
Quoted 6 lines
Quoted 4 lines
Tested on IGEP v2 board with a Muxed OneNAND(DDP) 512MB 1.8V 16-bit (
0x58) with 2 planes from Numonyx andCONFIG_MTD_ONENAND_2X_PROGRAMset to ySigned-off-by Enric Balletbo i Serra <[email protected]>Kyungmin, would be nice to have your ack/nack.
Sorry for late reply
One more check, it seems to use the invalidate instead of update bufferram. In case of 2X PROGRAM, it always uses the BUFFERRAM0 so invalidate another bufferram.
Don't set the bufferram index.
Thank you,
Kyungmin Park
Quoted 10 lines
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html