linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Enric Balletbo i Serra <eballetbo@gmail.com>
To: linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
	kyungmin.park@samsung.com, dwmw2@infradead.org,
	Artem.Bityutskiy@nokia.com, adrian.hunter@nokia.com,
	m.szyprowski@samsung.com
Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Subject: [PATCH 1/1] mtd: OneNAND: fix bufferram management when chip has 2-planes.
Date: Sat, 23 Oct 2010 15:43:54 +0200	[thread overview]
Message-ID: <1287841434-3349-2-git-send-email-eballetbo@gmail.com> (raw)
In-Reply-To: <1287841434-3349-1-git-send-email-eballetbo@gmail.com>

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@gmail.com>
---
 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

  reply	other threads:[~2010-10-23 13:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-23 13:43 [PATCH 0/1] mtd: OneNAND: fix bufferram management Enric Balletbo i Serra
2010-10-23 13:43 ` Enric Balletbo i Serra [this message]
2010-10-26  9:36   ` [PATCH 1/1] mtd: OneNAND: fix bufferram management when chip has 2-planes Artem Bityutskiy
2010-10-26 10:29     ` Kyungmin Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1287841434-3349-2-git-send-email-eballetbo@gmail.com \
    --to=eballetbo@gmail.com \
    --cc=Artem.Bityutskiy@nokia.com \
    --cc=adrian.hunter@nokia.com \
    --cc=dwmw2@infradead.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).