From: Artem Bityutskiy <dedekind@infradead.org>
To: Jinyoung Park <parkjy@mtekvision.com>
Cc: tglx@linutronix.de, linux-mtd@lists.infradead.org
Subject: Re: oobavail size calculation error in nand_base.c
Date: Fri, 15 May 2009 17:11:43 +0300 [thread overview]
Message-ID: <1242396703.27996.251.camel@localhost.localdomain> (raw)
In-Reply-To: <280b69ac0905140128u135f8b2aua50114faebb593e0@mail.gmail.com>
On Thu, 2009-05-14 at 17:28 +0900, Jinyoung Park wrote:
> Hello.
>
> I found error in nand_base.c.
> In nand_scan_tail() function, oobavail size calculation result is
> wrong as follow circumstances.
> - Define nand_ecclayout using full oobfree array like below.
> .oobfree = { {2, 6}, {11, 2}, {16, 8}, {27, 2}, {32, 8}, {43, 2},{48,
> 8}, {59, 2} }
> - Using ARM EABI cross compiler when kernel compile also enable
> "Use the ARM EABI to compile the kernl" feature in kernel menuconfig.
> I using ARM EABI compiler that codesourcery release arm-2008q3-51.
>
> In this case, right oobavail size is 38 but result is too much
> value(e.g. 2703572308...). It's random.
> I think sometimes happen that after beyond oobfree array(oobfree[8])
> is not 0 when ARM EABI compilation.
> Below codes are my modified code. Please check...
It seems the following patch which sits in my l2-mtd-2.6.git fixes
this as well: http://git.infradead.org/users/dedekind/l2-mtd-2.6.git
Author: David Brownell <dbrownell@users.sourceforge.net>
Date: Tue Apr 21 19:51:20 2009 -0700
MTD: NAND: don't walk past end of oobfree[]
Resolve issue noted by Sneha: when computing oobavail from
the list of free areas in the OOB, don't assume there will
always be an unused slot at the end. With ECC_HW_SYNDROME
and 4KB page chips, it's fairly likely there *won't* be one.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: "Narnakaje, Snehaprabha" <nsnehaprabha@ti.com>"
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2009-05-15 14:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 8:28 oobavail size calculation error in nand_base.c Jinyoung Park
2009-05-15 14:11 ` Artem Bityutskiy [this message]
[not found] <37597.192.168.10.89.1242365806.squirrel@dbdmail.itg.ti.com>
2009-05-15 6:23 ` Park Jinyoung
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=1242396703.27996.251.camel@localhost.localdomain \
--to=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=parkjy@mtekvision.com \
--cc=tglx@linutronix.de \
/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