On Mon, 14 Feb 2005, Nemanja Popov wrote:

> 
> > Now I understand.  You say that the SRAM address space is made available
> > to the pxa user through your FPGA driver.  Can you change that driver to
> > make it export the SDRAM contents as a block device file (call it
> > /dev/fpga-sdram)?  If you can do that, then g-file-storage will be able to
> > use the file as the backing storage.
> 
> I'm not shure about that. I'm not that familiar with block device drivers. 
> If someone have some example I'll appreciatte it. This idea looks like the 
> most elegant.

I'm not very familiar with them either.  The forthcoming book "Linux
Device Drivers (third edition)" will undoubtedly have some good examples.

> > Another alternative is for you to modify the file_storage.c source code,
> > to make it use the SDRAM directly as backing storage instead of going
> > through the VFS as it does now.  This might be an easier change.  It would
> > also run faster, since it would avoid the filesystem layer and would have
> > fewer data copies.  But the speed difference might not be noticeable
> > because you are probably limited by the speed of the USB connection rather
> > than the speed of data access.
> 
> I don't understand how to cheat host, to see all files and its sizes on 
> SDRAM. Don't I need a filesystem to provide such info.

If you want the host to see a filesystem, then yes, you would need to have 
a filesystem stored in the SDRAM.  But if you don't mind making the user 
programs access the contents of SDRAM directly then you don't need a 
filesystem.

Notice that you would face this same problem if you adopt the suggestion 
above, using /dev/fpga-sdram as a backing file.  Either way, the host 
won't see a filesystem unless one is stored in the SDRAM contents.

> I guess (when using backing file) host sees all files and their's sizes 
> stored on backing file, and when tries to copy some file from backing 
> storage to some folder, it sends READ request through USB connection to the 
> target. That READ request includes size in bytes which needs to be read. To 
> be clear, how to tell host what is the size of the file we want to copy. I 
> don't know much about fs, partition tables and stuff

If you access the SDRAM contents directly, you don't need to know that 
stuff.

> Also, is using g_ether good idea for this purpose? What transfer rate I can 
> get when using USB2.0 NET2272 device (not on board yet) in both variants, 
> with g_file_storage or g_ether.

I don't know, but I imagine the transfer rate is limited more by the speed
of the USB connection than by the protocol you use.

Alan Stern



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to