Alan Stern wrote:
On Thu, 23 Feb 2006, Thomas Thanner wrote:


We tested with single processor, unfortunately same error.

The only method we found to write error free is using not the regular "cp" command. When using "dd" with a block size of 4096 it works just fine, and we still get 2.5 MByte/s true write speed. I think we override the CF card. Slowing down the write process just a little helps to keep the errors away.

Thanks for all the help. At the moment I think we have to live with that 
solution.


Very strange. I have no idea why "dd" should work and "cp" should fail, except that "dd" bypasses the filesystem code. Anyway, it's good that you figured out a way to work around the problem.

Have you checked the partition table on the card and run "fsck" to check the filesystem?

Alan Stern



We tested both, formatting CF-card before copy or just removing existing files and copy then. We have tested CF-card with partitioning and without, too. Always the same result.

To do a little more investigations I wrote a little utility in C that does nothing else but open a file for read and another for write with regular open(). Then it copies fixed size chunks from the input file to the output file using standard read() and write() operations. For chunk sizes smaller than or equal to 4096 everything works just fine, like "dd". But we do not bypass filesystem this way, I guess.

At the moment I still favour the hypothesis that linux tries to write too fast to the CF card. The problem always starts when the CF card has to "slow down" USB transfers because it has to write to its FLASH memory physically. I guess handshake is implemented bad on the interface chips of many card readers.

As soon as we slow down copy process, either by adding lots of debugging messages to /var/log/messages or by forcing copy process to use only small chunks of memory at a time, we have no problems any more.

--

Thomas Thanner
Manager System Development
Citron GmbH
Anwaltinger Str. 14
D-86165 Augsburg
Tel. : ++49-821-74945-0
Fax. : ++49-821-74945-99
Email: [EMAIL PROTECTED]
http://www.citron.de




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to