public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* question about nand_do_read_oob/nand_do_read_ops when "mtd_oob_ops.mode==MTD_OOB_PLACE"?
@ 2007-07-12  1:48 Shawn RONG
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn RONG @ 2007-07-12  1:48 UTC (permalink / raw)
  To: linux-omap-open-source

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.
========================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread
* question about nand_do_read_oob/nand_do_read_ops when "mtd_oob_ops.mode==MTD_OOB_PLACE"?
@ 2007-07-06  8:54 Shawn RONG
  0 siblings, 0 replies; 2+ messages in thread
From: Shawn RONG @ 2007-07-06  8:54 UTC (permalink / raw)
  To: linux-omap-open-source

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.
========================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-07-12  1:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-12  1:48 question about nand_do_read_oob/nand_do_read_ops when "mtd_oob_ops.mode==MTD_OOB_PLACE"? Shawn RONG
  -- strict thread matches above, loose matches on Subject: below --
2007-07-06  8:54 Shawn RONG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox