Re: USB storage gadget problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 28 Dec 2009, J.Hwan.Kim wrote:

> Hi, everyone
> 
> I wish to use my embedded system as USB storage gardget.
> I installed module g_file_storage as follows :
> 
> #insmod g_file_storage file=/dev/mtdblock5
> 
> mtdblock5 is NAND flash JFF2 file system (root file system of my device)

That is an extraordinarily bad thing to do.  If it had worked, it would
have corrupted your root filesystem.

When you export a device via g_file_storage, it must not contain a
filesystem that is mounted on the gadget machine.  This means you
cannot use the gadget's root device.  Use some other partition or other 
device instead.

> but in windows or linux pc, I cannot see the USB storage device above.
> 
> The following message appear periodically : g_file_storage gadget :
> full speed config #1
> 
> When I "cat /proc/bus/usb/device", the device is shown as follows :
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=01 Dev#=  3 Spd=12  MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=0525 ProdID=a4a5 Rev= 3.13
> S:  Manufacturer=Linux 2.6.27 with at91_udc
> S:  Product=File-backed Storage Gadget
> S:  SerialNumber=372041756775
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
> E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
> 
> 
> How can I see and use my device as storage device in windows or linux PC?
> How can I fix the problem ?

Probably you need to add "stall=no" to the insmod line.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux