erase / interrupts

David Woodhouse dwmw2 at infradead.org
Mon May 21 08:32:34 EDT 2001


psionic at psionic.de said:
> I have two questions. First of all, what happens to the interrupts
> during an erase? Are they disabled?

That's entirely dependent on the driver. In general, interrupts _shouldn't_ 
be disabled. They aren't disabled in the cfi_cmdset_000[12] drivers.

The erase method may sleep. And it may return immediately, calling the 
erase completion callback later, from a timer. That isn't implemented yet. 
Of course, it's entirely permitted to do both.

> The other one is, what happens if the power fails during a erase/write.
> Does the init-code handle the reset of the chip?

Yes, it should do. It's up the the application to work out the the sector 
in question was partially erased and erase it properly. See the marker 
nodes in JFFS2. 

--
dwmw2






More information about the linux-mtd mailing list