New release of MTD code pending.

David Woodhouse dwmw2 at infradead.org
Mon Mar 27 10:22:29 EST 2000


alex at cendio.se said:
>  When I fire away a flash erase, can i just continue working with the
> flash, content with knowing that if i do a read or write while the
> chip is erasing it will block? I thought so at first, and it would be
> the logical thing.  

This is how it _should_ work. The hardware driver should keep track of when 
each chip is busy erasing, and when it receives a new request for that chip, 
it may block, or may decide to interrupt the erase (it must then restart the 
erase itself).


>  WTF is this? 

Broken. Luckily, not even M-Systems can find examples of the device that code
is supposed to drive. I _think_ that the idea was "if we're currently erasing 
this cell, then it's going to be all 0xFF, so there's no point in waiting 
until it's done, we might as well use memset."


>  Also, doc2000.c: doc_erase() doesn't seem to call the callback
> function at all.

Two reasons: firstly, like I said - I didn't remember how it worked, so I just
implemented doc_erase() synchronously. nftl.c relies on that, so would break if
you coded a new NAND device driver which wasn't synchronous (Patent issues
aside).

Secondly, it was easier to get something up and running without worrying about
threading - I've been putting off the threading of doc2000 / nftl until I'm
happy with the correctness of the NFTL code. But it's definitely on the TODO
list.




--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list