On 12/08/2011 04:44 AM, LiuShuo wrote: > 于 2011年12月08日 03:11, Scott Wood 写道: >> And if we do want to make such assumptions, we could rip out all usage >> of index/column here, and just handle "oob" and "full page" cases. > The function nand_do_write_ops() in nandbase.c is a Nand internal > interface. > It always is called when application write to nand flash. (e.g. dd) > In this function, partial page write is dealt with by filling '0xff' to > buffer before data copy. > (nand_do_write_oob() is similar) > So I don't think we need to do it in our controller driver again, it > should be a job of upper layer.
If this is to be considered part of the interface contract, then perhaps do a WARN_ON() if we see an unexpected index/column? And after that, only consider full-page or full-oob possibilities. -Scott _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev