This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP 3530 g_file_storage file error for USB File Storage

Hi Community,

 

I want to use my device as a USB File Storage when I connect it to a Host PC.  I follow the instructions given in www.linux-usb.org/gadget/file_storage.html

I have a problem with OMAP 3530"   .

When I try to command

insmod /lib/modules/2.6.24_mvl5024-omap3530_evm/kernel/drivers/usb/gadget/g_file_storage.ko storage file=/mnt/backing_file stall=0

I get the message

error inserting '/lib/modules/2.6.24_mvl5024-omap3530_evm/kernel/drivers/usb/gadget/g_file_storage.ko': -1 No such device

Also, I tried

modprobe g_file_storage file=/mnt/backing_file stall=0

FATAL: Error inserting g_file_storage (/lib/modules/2.6.24_mvl5024-omap3530_evm/kernel/drivers/usb/gadget/g_file_storage.ko): No such device

 

The USB related configs are

#
# OMAP 343x high speed USB support
#
# CONFIG_USB_MUSB_HOST is not set
CONFIG_USB_MUSB_PERIPHERAL=y
# CONFIG_USB_MUSB_OTG is not set
CONFIG_USB_GADGET_MUSB_HDRC=y
# CONFIG_MUSB_PIO_ONLY is not set
CONFIG_USB_INVENTRA_DMA=y
# CONFIG_MUSB_USE_SYSTEM_DMA_RX is not set
# CONFIG_USB_TI_CPPI_DMA is not set
CONFIG_USB_MUSB_LOGLEVEL=0

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# USB Gadget Support
#
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_AMD5536UDC is not set
# CONFIG_USB_GADGET_ATMEL_USBA is not set
# CONFIG_USB_GADGET_FSL_USB2 is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_PXA2XX is not set
# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LH7A40X is not set
# CONFIG_USB_GADGET_OMAP is not set
# CONFIG_USB_GADGET_S3C2410 is not set
# CONFIG_USB_GADGET_AT91 is not set
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_GADGETFS is not set
CONFIG_USB_FILE_STORAGE=m
CONFIG_USB_FILE_STORAGE_TEST=y
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_MMC is not set
# CONFIG_NEW_LEDS is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

Also musb_hdrc is built-in.

If you inform me about how I can fix the problem, I will be very pleased

 Thanks in advance

  • Ok, I fixed the problem. It results from musb initialization error.

  • Hi Yunus,

    We are also facing the same issue. 

    While inserting g_file_storage.ko it returns error as 'No such device'. 

    We also get 'musb_init_controller failed' while booting.

    I'm suspecting that it would be the issue with interrupt or DMA. I tried for different options for DMA in menuconfig. It is not working for anything.

    Please find the log below:

    [ 0.361602] musb-hdrc: version 6.0, otg (peripheral+host), debug=0
    [ 0.361938] musb-hdrc musb-hdrc.0: dma type: dma-inventra
    [ 0.361968] musb-hdrc musb-hdrc.0: musb_init_controller failed with status -19

    ...........................................................................................

    ...........................................................................................

    ...........................................................................................

    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org am37x-evm ttyO2

    Arago 2011.09 am37x-evm ttyO2

    am37x-evm login: root
    root@am37x-evm:~# insmod /media/mmcblk0p1/g_file_storage.ko file=/dev/mmcblk0p1
    stall=no removable=yes
    insmod: error inserting '/media/mmcblk0p1/g_file_storage.ko': -1 No such device
    root@am37x-evm:~#

    Find .config file attached.

    Please help us on this. Thank you.

    Regards, 

    RajeeSankar