Jon Povey wrote:
> Gilles Chanteperdrix wrote:
>> Jon Povey wrote:
>>> I am seeing rare SD card write corruption on DM355 running
>>> 2.6.36. The system will get itself into a state where it appears
>>> all SD writes are offset by two bytes. This is using a vfat
>>> filesystem on the SD, and affects the FAT and directories at
>>> least.
>> we observe something similar with the 2.6.32 kernel. In our case,
>> it happens almost systematically if we remove the SD card while a
>> transfer is occuring.
> 
> Thanks for the report. That sounds like what we are seeing. I suspect
> some kind of incomplete DMA or controller state clearing on surprise
> removal.

We did not investigate this issue any further (and notably, we did not
hexdump the SD card contents when corrupted), but it certainly looks
like something like this. The issue is kind of deterministic with regard
to the timing when we remove the SD card. When we do so, we observe the
SD card controller, or its driver has one of three reactions:
- it continues to work normally
- it fails to detect later re-insertion of an SD card
- next dosfsck reports error in available clusters count and "repairing"
the filesystem actually corrupts the FAT32 "FS information sector",
making it unmountable, and fails to detect the superblock on any later
SD card.

In our case, removing the SD card after recording 45s triggers the third
case almost certainly. I assumed 45s is the time when the FS information
sector is first modified in our case, but this timing is probably
specific to our application.

Some other information: we have this issue on DM368 using the 2.6.32
kernel from the Arago tree. And our SD card are "correctly" formatted,
i.e. the same way as how the SD association SD card formatter does.

-- 
Gilles Chanteperdrix
NexVision, http://www.nexvision.fr
Office: 99, av Clot-Bey, 13008 Marseille, France
Phone: +33 (0)4 91 77 62 87 / Fax: +33 (0)4 91 77 64 10
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to