On Thu, 10 Feb 2005, Nemanja Popov wrote:

> Hi,
> 
> Is there a possibility to force g_file_storage to transfer captured data 
> directly from device's RAM instead of using file as a backing storage?
> This should be used only for downloading data to host (but writing to id 
> will be good). Data in the device's RAM is stored in raw format (no file 
> system). Maximum amount of data will be 256MB. It can be transfered as a one 
> file if necessary.
> Should I make MTD driver for this part od memory?

Your question isn't very clear.  You wouldn't want your data to overwrite
the Linux kernel running in the device, for instance.  Remember that Linux
is using the device's RAM in order to operate; how do you expect to find a
region that's available for your backing file?

Like David said, you can use a ramdisk.  Or an MTD device file.  Either 
one should work okay as backing storage.

>  What I'm seeing as a problem is that data should be read through filesystem 
> and data can not be written through it (because design of the device, needs 
> high speed of data storing).

I don't understand what you mean.  In any case, g_file_storage uses the 
filesystem to access its backing file.

> I have idea to make dummy file for backing storage with some fs on it, and 
> which will contain one dummy file which should represent data in device's 
> memory. 

> Is there a way to map that dumy file to device's memory, and when getting is
> requested on the host side, whole memory is copied instead of that dummy
> file.
> Maybe my idea is crazy but I don't know how to approach to this problem.
> At the end, device's memory content chould be copied over USB connection
> (and device should be controled over usb if possible) on any possible way.

You can also use /dev/mem as backing storage.  But unless you're extremely 
careful about it you will end up crashing the device.

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