USBAT 0.5.4 for Linux 2.6

jdpinnj at optonline.net jdpinnj at optonline.net
Tue Feb 8 05:00:07 CET 2005


Hi Daniel -

The device is the ZIO that came with a Canon G2.   No other CF readers to toy with.

My observations using the dd to the device:

The problem is on the writing: On an old 2.4.25 kernel, I can write a 1M file to the card that will be identical to one read off of the device directly.  This is consistent with the behavior that I have with a filesystem on the card.

On the 2.6.10 kernel, I can consistently write and read up to 64k.  Anything over that amount gave inconsistent results.  Looking over the driver code shows that it is a magic number on the write size to the device.  I made a minor mod to  line 1008 of shuttle_usbat.c, and changed alloclen to 32k (65536u to 32768u).  After a recompile and reload of the modules, I could not successfully write and re-read file greater than 32k.  (the logs did show the write size at 32768).  Any files that exceed a single write seems to cause the problem.

I went back over the maillists and tried some of the various drivers.  I was able to get 2.6-04.25 to work against a 2.6.8 kernel.  I was not able to get 2.6-04.27 to work.  I can send logs, but they didn't show anything unusual.

Let me know if there is anything else to try.

Jim

----- Original Message -----
From: Daniel Drake <dsd at gentoo.org>
Date: Saturday, February 5, 2005 8:39 am
Subject: Re: USBAT 0.5.4 for Linux 2.6

> Hi Jim,
> 
> Hm, this is odd. There are no errors in your log anywhere- it seems 
> to have 
> transferred everything perfectly - but the uservisible results 
> don't tie in 
> with this.
> 
> Which device is it? Which kernel are you running?
> Have you got any other CF readers you can test on the same 
> configuration?
> We can also test it without getting filesystems involved. Be warned 
> that this 
> will destroy any data (including the partition table) on your card.
> 
> Use this command to create a 1mb file:
> # dd if=/dev/urandom of=fileA bs=1M count=1
> 
> Record its md5sum:
> # md5sum fileA
> 
> Now copy it *directly* onto the device. Make sure it isn't mounted, 
> just do 
> the exact command below, where sda is the root device node: (notice 
> that i use 
> sda, not sda1...)
> # cat fileA > /dev/sda
> 
> Now copy that back over into another file:
> # dd if=/dev/sda of=fileB bs=1M count=1
> 
> And check its md5sum:
> # md5sum fileB
> 
> Both md5sums should match. Do they? You might wish to experiment 
> with 
> different file sizes.
> 
> Thanks,
> Daniel
> _______________________________________________
> Usbat2 mailing list
> Usbat2 at lists.lysator.liu.se
> http://lists.lysator.liu.se/mailman/listinfo/usbat2
> 



More information about the Usbat2 mailing list