[PATCH 1/1] mtd: OneNAND: fix bufferram management when chip has 2-planes.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
---
 drivers/mtd/onenand/onenand_base.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index a2bb520..53aa13e 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -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);
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux