[Yaffs-archive] [YAFFS] Re: About nand_erase

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Charles Manning
Date:  
To: yaffs
Subject: [Yaffs-archive] [YAFFS] Re: About nand_erase
The problem has been fixed and checked in.

yaffs_mtdif.c no longer does the callback.

-- CHarles


On Sun, 06 Apr 2003 14:49, Charles Manning wrote:
> Steve
>
> Sorry to take so long getting back to you.
>
> When I wrote this code I thought the callback would get called regardless
> of whether or not the actioned passed or failed.
>
> Reading through the nand.c in mtd it appears that the callback only gets
> called if the erase passes.
>
> We have three options here:
>
> * Forget using the callback (ie. in yaffs_mtdif.c, do not set up a
> callback). Just use the result from the call. This will work if the call
> only returns after the erase is complete (with or without failure).
> * Change yaffs_mtdif.c to up the lock on error.
> * Change nand.c to call the callback regardless of the result.
>
> The callback releases a lock, but it appears that the chip is locked anyway
> so this extra locking is perhaps unwarranted.
>
> Thomas: I defer to your judgement. In the meantime, Steve, I suggest
> disabling the callback. ie: in nandmtd_EraseBlockInNAND:
> - set ei.callback to NULL instead of the callback address
> - comment out the down(&dev.sem)
>
>
> -- Charles
>
> On Thu, 03 Apr 2003 17:51, Steve Tsai wrote:
> > My system halt when I did some file operation on yaffs file system. And
> > the console display "nand_erase: attempt to erase a bad block at page
> > 0x00001ce0" then the system halt. I found that nandmtd_EraseBlockInNAND
> > will not return, if nand_erase does not call the callback function.
> > nand_erase will not call to callback function, if it does not erase
> > flash successfully. Does anyone fix it?
> >
> > Steve Tsai
> >
> >
> > -------------------------------------------------------------------------
> >-- ------------ This mailing list is hosted by Toby Churchill open
> > software (www.toby-churchill.org). If mailing list membership is no
> > longer wanted you can remove yourself from the list by sending an email
> > to
> > with the text "unsubscribe" (without the
> > quotes) as the subject.


---------------------------------------------------------------------------------------
This mailing list is hosted by Toby Churchill open software (www.toby-churchill.org).
If mailing list membership is no longer wanted you can remove yourself from the list by
sending an email to with the text "unsubscribe"
(without the quotes) as the subject.