From: Shawn RONG <shawn.rong@st.com>
To: linux-omap-open-source@linux.omap.com
Subject: question about nand_do_read_oob/nand_do_read_ops when "mtd_oob_ops.mode==MTD_OOB_PLACE"?
Date: Thu, 12 Jul 2007 09:48:40 +0800 (HKT) [thread overview]
Message-ID: <20070712094840.CJS07601@mail1.sha.st.com> (raw)
Hi all,
Based on doc "[MTD] Rework the out of band handling completely", I think when MTD_OOB_PLACE is selected, the read length should have nothing to do with value of mtd_oob_ops.oobavail, which is only related with MTD_OOB_AUTO mode.(See reference in the end)
while in function nand_do_read_oob() and nand_do_read_ops() in nand_base.c, the read length is affected by value of mtd_oob_ops.oobavail, e.g.
========================================================
nand_do_read_oob():
if (ops->mode == MTD_OOB_RAW)
len = mtd->oobsize;
else
len = chip->ecc.layout->oobavail;
========================================================
nand_do_read_ops():
if (ops->mode != MTD_OOB_RAW) {
int toread = min(oobreadlen,
chip->ecc.layout->oobavail);
if (toread) {
oob = nand_transfer_oob(chip,
oob, ops, toread);
oobreadlen -= toread;
}
} else
buf = nand_transfer_oob(chip,
buf, ops, mtd->oobsize);
========================================================
Could anyone tell me why? I think handle above for mode MTD_OOB_PLACE should be same to MTD_OOB_RAW, not MTD_OOB_AUTO.
Someone has also the same question: http://lists.infradead.org/pipermail/linux-mtd/2007-February/017469.html
In his test, maybe this is a bug?
Any feedback would be appreciated, thanks!
Reference:
========================================================
http://lists.infradead.org/pipermail/linux-mtd-cvs/2006-May/005519.html
MTD_OOB_PLACE puts/gets the given oob data exactly to/from the place which is described by the ooboffs and ooblen fields of the mtd_oob_ops strcuture. It's up to the caller to make sure that the byte positions are not used by the ECC placement algorithms.
========================================================
next reply other threads:[~2007-07-12 1:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 1:48 Shawn RONG [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-06 8:54 question about nand_do_read_oob/nand_do_read_ops when "mtd_oob_ops.mode==MTD_OOB_PLACE"? Shawn RONG
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=20070712094840.CJS07601@mail1.sha.st.com \
--to=shawn.rong@st.com \
--cc=linux-omap-open-source@linux.omap.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