From: Kyungmin Park <kyungmin.park@samsung.com>
To: Timo Teras <timo.teras@solidboot.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>
Subject: OneNAND: Update OOB free table
Date: Mon, 18 Dec 2006 04:24:02 +0000 (GMT) [thread overview]
Message-ID: <14053092.180201166415887159.JavaMail.weblogic@ep_ml21> (raw)
Hi all,
> On Fri, Dec 15, 2006 at 12:41:53PM +0200, Artem Bityutskiy wrote:
> > On Fri, 2006-12-15 at 02:38 +0000, Kyungmin Park wrote:
> > > How about the the change the JFFS2 logic to skip the eccpos in cleanmark check.
> > > In onenand_oob_64, it describes the eccpos. So the JFFS2 skip the eccpos
> >
> > May you refine what is the problem please?
> jffs2_check_oob_empty() check that the whole OOB area contains only 0xff
> bytes except for the clean marker area. This is broken on OneNAND as writing
> clean marker to OOB area will change ECC bytes.
>
> Also the clean marker is not written properly as only the first oobfree
> table element is used. But this is a different issue.
How about the this patch?
It skips the ecc position which is defined in ecc layout in mtd drivers.
Thank you,
Kyungmin Park
--
diff -u -p -r1.1.1.1 wbuf.c
--- fs/jffs2/wbuf.c 12 Oct 2006 05:50:30 -0000 1.1.1.1
+++ fs/jffs2/wbuf.c 18 Dec 2006 04:21:29 -0000
@@ -967,6 +967,8 @@ int jffs2_check_oob_empty(struct jffs2_s
int i, page, ret;
int oobsize = c->mtd->oobsize;
struct mtd_oob_ops ops;
+ struct nand_ecclayout *oinfo = c->mtd->ecclayout;
+ int eccpos = 0;
ops.len = NR_OOB_SCAN_PAGES * oobsize;
ops.ooblen = oobsize;
@@ -991,6 +993,12 @@ int jffs2_check_oob_empty(struct jffs2_s
/* Special check for first page */
for(i = 0; i < oobsize ; i++) {
+ /* Skip ECC position for OneNAND */
+ if (i == oinfo->eccpos[eccpos]) {
+ eccpos++;
+ continue;
+ }
+
/* Yeah, we know about the cleanmarker. */
if (mode && i >= c->fsdata_pos &&
i < c->fsdata_pos + c->fsdata_len)
next reply other threads:[~2006-12-18 4:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-18 4:24 Kyungmin Park [this message]
2006-12-18 14:23 ` OneNAND: Update OOB free table Artem Bityutskiy
2006-12-21 11:15 ` Artem Bityutskiy
2006-12-21 12:35 ` Artem Bityutskiy
-- strict thread matches above, loose matches on Subject: below --
2006-12-26 7:15 Kyungmin Park
2006-12-22 1:52 Kyungmin Park
2006-12-22 9:17 ` Artem Bityutskiy
2006-12-15 2:38 Kyungmin Park
2006-12-15 8:33 ` Timo Teras
2006-12-15 10:41 ` Artem Bityutskiy
2006-12-15 11:19 ` Timo Teras
2006-12-08 0:11 Kyungmin Park
2006-12-08 8:43 ` Timo Teras
2006-12-11 12:20 ` Timo Teras
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=14053092.180201166415887159.JavaMail.weblogic@ep_ml21 \
--to=kyungmin.park@samsung.com \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=timo.teras@solidboot.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.