Are erase suspends possible?

Derek Ross dross at iders.ca
Tue Apr 2 12:59:14 EST 2002


> dross at iders.ca said:
> > I was looking through the code in  cfi_cmdset_0001.c, and it appears
> > that erase suspends are not implemented. Is this correct? 
> 
> No. Erase suspend has been working for ages. What version of 
> cfi_cmdset_0001.c are you looking at?

Sorry, I'm still wrapping my brain around mtd.

I'm looking at a recent version, and it has
the function "cfi_intelext_suspend".

I was also looking at the function "do_write_oneword", and
internally, it seems to halt if an erase is in progress.

Also, the function, do_erase_oneblock seems to 
block during the erase.

What would be good for my application is if there
were two more functions:

"do_erase_oneblock_dont_wait",
which doesn't wait for the erase to finish, and
returns immediately,

and

"do_write_oneword_suspend_if_needed",
which will always write without delay, even
if it has to suspend an erase that's in progress.

I'm sure it wouldn't be difficult to write these
extra functions (especially "do_write_oneword_suspend_if_needed", 
which would just need an call to "cfi_intelext_suspend"), 
but I'm worried that it would 
be impossible to call using /dev/mtd and ioctl calls.

Also, my app will effective deactivate any other 
flash interaction during this phase, so I'm not
worried about JFFS interference.

Thanks,
Derek Ross.





More information about the linux-mtd mailing list