On Wed, 1 Dec 2004, Sara Fonseca wrote:

> Here goes what I did: 
> 
> [EMAIL PROTECTED]:/home/knoppix# modprobe dummy_hcd 
> [EMAIL PROTECTED]:/home/knoppix# modprobe g_file_sotrage removable=y
> [EMAIL PROTECTED]:/home/knoppix# scsi_info /dev/sda
> SCSI_ID="0,0,0"
> MODEL="Linux File-Stor Gadget"
> FW_REV="0302"
> [EMAIL PROTECTED]:/home/knoppix# dd /dev/sda if=/dev/sda bs=512 count=1
> dd: opening `/dev/sda': No medium found

Very good.

Okay, on the line where you load g_file_storage you specified
"removable=y".  This means the driver will emulate a device with removable
media, like a Zip drive.  You did not specify the "file=..." parameter, so
the driver acted like a Zip drive with no cartridge inserted.  No wonder
you got a "No medium found" error!

If you want the driver to behave like a cartridge is loaded, then you have 
to provide a file for the driver to use as its backing storage.  For 
example, if you want to emulate an 8 MB disk, you could do this:

        dd if=/dev/zero of=backing bs=1M count=8
        modprobe g_file_storage file=backing

If you do this then the driver will not set the RMB flag in its inquiry 
information, because the "removable=y" parameter wasn't specified.

There are complete instructions on using g_file_storage in the comments at 
the start of the source code file.

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://productguide.itmanagersjournal.com/
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to