Skip to contentSkip to conversation

mtd: OneNAND: fix bufferram management.

PATCH In review Enric Balletbo i Serra 3 participants 4 messages Oct 23, 2010 – Oct 26, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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(-)
#1 lore raw

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 0x564fc9e8

Tested 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
index a2bb520..53aa13e 100644
@@ -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
#2 lore raw

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 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 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 and CONFIG_MTD_ONENAND_2X_PROGRAM set to y

Kyungmin, would be nice to have your ack/nack.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#3 lore raw

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 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 0x564fc9e8

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 and CONFIG_MTD_ONENAND_2X_PROGRAM set to y

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