At One Laptop Per Child we recently ran afoul of an ugly problem with some 8GB SD cards. It turns out that the cards
can die if you turn off power sooner than 1.6 seconds after a write. That 1.6 seconds is measured from after the SD bus
has already said "that programming step is done".
After some discussion with the vendor, we learned that this is an artifact of the way they are handling the TLC (three
level cell) array. The write first goes into a cache that is written in SLC (single level cell) mode, then is moved
into the TLC "backing store". If you turn off power during the write-back, the device can fail so badly that you have
to use a special machine to recover it.
The 1.6 seconds is not documented anywhere, and is not discoverable by reading card configuration or status information.
OLPC can suspend so quickly that we can easily run afoul of this problem.
Clearly, this is bad firmware in the controller, but it does bring up an interesting point. As FLASH devices get more
and more complex, the necessity of doing background housekeeping increases. Ideally, the algorithms should be safe
against power loss, but on the other hand, it would also be a good idea to give controllers a chance to shut down
gracefully when the OS knows it is about to turn off power.
Does anybody know of any standardization efforts to address the "clean shutdown" issue for SD or other FLASH interfaces?
Mitch Bradley
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html