about oobsize and ooboffs

刘勃 bo-liu at hotmail.com
Thu Aug 14 23:50:44 EDT 2008


Hi , all

I have a question about the "mtd->oobsize" and "ops->ooboffs" .
I think "mtd->oobsize" is the whole spare area size for nand flash.
and "ops->ooboffs" is the oob's offset in the spare area only when defined marco MTD_OOB_PLACE.

But in file nand_base.c 
funtion nand_do_read_oob() first calls chip->ecc.read_oob, then calls nand_tranfser_oob().
if defined marco MTD_OOB_PLACE. 
nand_tranfser_oob() will call funtion memcpy(oob,chip->oob_opi + ops->offs, len), where "len = mtd->oobsize".

My question is if "ops->offs" is not 0, then memcpy will failed ? becausse chip->ecc.read_oob() just read "mtd->oobsize" to chip->oob_opi's buffer.

Thank you!
Bob



_________________________________________________________________
快来看看这些猫咪有多逗,爆笑!
http://cnweb.search.live.com/video/results.aspx?q=%E5%8F%AF%E7%88%B1%E7%8C%AB%E5%92%AA&Form=MEVHAA



More information about the linux-mtd mailing list