Forum Topic - SD card writes don't commit: (3 Items)
   
SD card writes don't commit  
Now that I got the driver working, I'm seeing strange behavior:

1. start driver
2. mount dos partition
3. ls and cat files on SD card to verify original files are there and contents look right
4. copy some files to the SD card
5. again verify files are there and contents look ok
6. umount the drive
7. mount the drive
8. again verify files are there and contents look ok
9. slay the driver
10. restart driver
11. mount disk
5. upon ls, the original files are there, but the files that I copied there are gone

Also, the heap is 5M...which makes me wonder if it's using a memory image of the file system.

dinit -h /dev/hd0t6
   and
dcheck -m /mnt/sdcard

have no effect.

Thanks for any help.
Todd
Re: SD card writes don't commit  
I'm working on an SD driver as I write this.

My suspicion is that your driver is not actually carrying out the transaction to write to the SD card correctly, but yet
 is telling io-blk that it has w/o error....so io-blk carries on as if nothing is wrong.

You'll need to actually see the blocks being written, I would instrument your driver to see that the correct steps are 
taken and that you are getting a Transfer Complete interrupt (if your controller supports it) after the WRITE_SINGLE or 
WRITE_MULTIPLE block completes.

When you run your driver try the following to get rid of cache:

devb-sd blk cache=0 <other parameters>

There are other io-blk parameters that may be helpful, see the io-blk.so entry in the Utilities Reference.

Kevin





  
Re: SD card writes don't commit  
> I'm working on an SD driver as I write this.
> 
> My suspicion is that your driver is not actually carrying out the transaction 
> to write to the SD card correctly, but yet is telling io-blk that it has w/o 
> error....so io-blk carries on as if nothing is wrong.
> 
> You'll need to actually see the blocks being written, I would instrument your 
> driver to see that the correct steps are taken and that you are getting a 
> Transfer Complete interrupt (if your controller supports it) after the 
> WRITE_SINGLE or WRITE_MULTIPLE block completes.

Did this and see the writes happening. I have a loop to retry if data error occurs (happens now and then). I was using 
stream mode for some odd reason and changed to block mode. Now it seems to be working correctly, files are present after
 slaying the driver and restarting/remounting.

> 
> When you run your driver try the following to get rid of cache:
> 
> devb-sd blk cache=0 <other parameters>

figured this out yesterday. 0 gave me very slow response and some funny looking garbage at the end of files. changed to 
128k and things look better.

> 
> There are other io-blk parameters that may be helpful, see the io-blk.so entry
>  in the Utilities Reference.
> 
> Kevin
> 

Thanks Kevin!!! You've been a great amount of help.
Todd