Hi,
I have a board based on the AT91RM9200EK. I have linux 2.6.22 installed and running ok. I am trying to get the usb device gadget to work (g_file_storage), but found some probemls when connecting it to the USB host. Here is what I do:
Load modules:
Code:
root:~> insmod /lib/modules/at91_udc.ko
udc: at91_udc version 3 May 2006
root:~> insmod /lib/modules/g_file_storage.ko file=/dev/mtdblock8 stall=0
g_file_storage gadget: File-backed Storage Gadget, version: 28 November 2005
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, file: /dev/mtdblock8
root:~>
/dev/mtdblock8 is a spare flash partition I have without filesystem.
When I connect the device to a USB host (win XP) it recognizes a "USB mass storage device" but then an error occures and when I look the details into the device manager I see "This device cannot start. (Code 10)"
When I connect the device to a linux host thisis what I see in dmseg:
Code:
[ 366.092155] usb 2-2: new full speed USB device using uhci_hcd and address 2
[ 366.290581] usb 2-2: configuration #1 chosen from 1 choice
[ 371.274550] usb 2-2: can't set config #1, error -110
I have the suspect that the problem might arise because the the filesystem is read-only (CRAMFS).
Any idea? Thanks in advance