UBI use subpage and verify fail when write on nandflash

Jon Povey Jon.Povey at racelogic.co.uk
Wed Apr 18 01:05:35 EDT 2012


Brian Norris wrote:
> On Tue, Apr 17, 2012 at 7:19 AM, b w <wdjjwb at gmail.com> wrote:
>> Hello,
>>    Use linux 2.6.32,ARM,nandflash(support subpage),config
>> CONFIG_MTD_NAND_VERIFY_WRITE. UBI attach fail on empty flash.I found
>> when UBI write VID header to the second subpage of eraseblock,will
>> call function "nand_write_page",this function write a whole page(i
>> think the page size is 2048),the unset bit of the buf is filled with
>> 0xff,after write,
>>
>> #ifdef CONFIG_MTD_NAND_VERIFY_WRITE
>>        /* Send command to read back the data */
>>        chip->cmdfunc(mtd, NAND_CMD_READ0, 0, page);
>>
>>        if (chip->verify_buf(mtd, buf, mtd->writesize))
>>                return -EIO;
>> #endif
>>
>> now,the buf for verify is not equal to the buf which write,because
>> the buf which read from flash contains EC header ?
>>
>> I found there is topic also mention subpage:
>>
> http://lists.infradead.org/pipermail/linux-mtd/2010-September/
> 031822.html
>
> Hmm, not sure if this is exactly the same issue, but it is related.
> It's worth CC'ing Jon to see if he pursued this at all.

I have just carried on happily using my hack. Don't have the time to
work on a proper fix, sorry.

Hack attached if it is of interest, apologies for the format,
blame my email client. This is against roughly mainline 3.0

--
Jon Povey
jon.povey at racelogic.co.uk

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-mtd-NAND-don-t-write-ECC-for-unwritten-subpages.patch
Type: application/octet-stream
Size: 7605 bytes
Desc: 0001-mtd-NAND-don-t-write-ECC-for-unwritten-subpages.patch
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120418/2700c94b/attachment.obj>


More information about the linux-mtd mailing list