Hi,
I am trying to implement USB bulk transfer using gadgetfs by customizing the sample gadgetfs application availed from http://www.linux-usb.org/gadget/
I am using OMAP3530 EVM in gadget side and the application worked fine when AM35x-OMAP35x- PSP 02.01.03.11 was used. But when I upgraded the PSP to
AM35x-OMAP35x- PSP 04.02.00.07 with linux kernel version 2.6.37, the application hangs as soon as enumeration is tried and a kernel panic occurs soon. The error is as follows:-
root@omap3evm:/var/volatile/tmp# ./usb_image_tx
[ 148.506286] gadgetfs: bound to musb-hdrc driver
/dev/gadget/musb-hdrc ep0 configured
serial="qwryqx8rfi37g0auaf527oadccos2vqylrxb6rltkwhvc7zti1zeu8vs387tf50"
[ 198.473205] gadgetfs: connected
Inside musb_hdrc in auto_config!!!*******gadgetfs connect*********
connected high speed
*******gadgetfs setup*********
Inside USB_REQ_GET_DESCRIPTOR
*******gadgetfs setup*********
Inside USB_REQ_GET_DESCRIPTOR
*******gadgetfs setup*********
Inside USB_REQ_GET_DESCRIPTOR
*******gadgetfs setup*********
Inside USB_REQ_GET_DESCRIPTOR
[ 198.526428] gadgetfs: configuration #1
*******gadgetfs setup*********
[ 198.532897]
[ 198.532897] =============================================
[ 198.540618] [ INFO: possible recursive locking detected ]
[ 198.546264] 2.6.37 #2
[ 198.548645] ---------------------------------------------
[ 198.554290] usb_image_tx/1650 is trying to acquire lock:
[ 198.559844] (&(&dev->lock)->rlock){-.-...}, at: [<bf0008ec>] ep0_complete+0x18/0xb4 [gadgetfs]
[ 198.569000]
[ 198.569000] but task is already holding lock:
[ 198.575103] (&(&dev->lock)->rlock){-.-...}, at: [<bf000c6c>] ep0_read+0x20/0x47c [gadgetfs]
[ 198.583953]
[ 198.583953] other info that might help us debug this:
[ 198.590789] 1 lock held by usb_image_tx/1650:
[ 198.595336] #0: (&(&dev->lock)->rlock){-.-...}, at: [<bf000c6c>] ep0_read+0x20/0x47c [gadgetfs]
[ 198.604644]
[ 198.604644] stack backtrace:
[ 198.609252] [<c004a348>] (unwind_backtrace+0x0/0xec) from [<c00a0998>] (__lock_acquire+0xe58/0x17e8)
[ 198.618835] [<c00a0998>] (__lock_acquire+0xe58/0x17e8) from [<c00a1404>] (lock_acquire+0xdc/0x100)
[ 198.628234] [<c00a1404>] (lock_acquire+0xdc/0x100) from [<c040e808>] (_raw_spin_lock_irqsave+0x48/0x84)
[ 198.638061] [<c040e808>] (_raw_spin_lock_irqsave+0x48/0x84) from [<bf0008ec>] (ep0_complete+0x18/0xb4 [gadgetfs])
[ 198.648834] [<bf0008ec>] (ep0_complete+0x18/0xb4 [gadgetfs]) from [<c02bb8a4>] (musb_g_giveback+0x13c/0x164)
[ 198.659149] [<c02bb8a4>] (musb_g_giveback+0x13c/0x164) from [<c02b9828>] (musb_g_ep0_queue+0x190/0x1ec)
[ 198.668975] [<c02b9828>] (musb_g_ep0_queue+0x190/0x1ec) from [<bf000d10>] (ep0_read+0xc4/0x47c [gadgetfs])
[ 198.679107] [<bf000d10>] (ep0_read+0xc4/0x47c [gadgetfs]) from [<c00fd6a4>] (vfs_read+0xac/0x134)
[ 198.688385] [<c00fd6a4>] (vfs_read+0xac/0x134) from [<c00fd7d8>] (sys_read+0x3c/0x68)
[ 198.696594] [<c00fd7d8>] (sys_read+0x3c/0x68) from [<c0044540>] (ret_fast_syscall+0x0/0x3c)
[ 205.180084] BUG: spinlock lockup on CPU#0, usb_image_tx/1650, c29ad600
[ 205.186950] [<c004a348>] (unwind_backtrace+0x0/0xec) from [<c020374c>] (do_raw_spin_lock+0x110/0x14c)
[ 205.196594] [<c020374c>] (do_raw_spin_lock+0x110/0x14c) from [<c040e82c>] (_raw_spin_lock_irqsave+0x6c/0x84)
[ 205.206909] [<c040e82c>] (_raw_spin_lock_irqsave+0x6c/0x84) from [<bf0008ec>] (ep0_complete+0x18/0xb4 [gadgetfs])
[ 205.217681] [<bf0008ec>] (ep0_complete+0x18/0xb4 [gadgetfs]) from [<c02bb8a4>] (musb_g_giveback+0x13c/0x164)
[ 205.227966] [<c02bb8a4>] (musb_g_giveback+0x13c/0x164) from [<c02b9828>] (musb_g_ep0_queue+0x190/0x1ec)
[ 205.237792] [<c02b9828>] (musb_g_ep0_queue+0x190/0x1ec) from [<bf000d10>] (ep0_read+0xc4/0x47c [gadgetfs])
[ 205.247924] [<bf000d10>] (ep0_read+0xc4/0x47c [gadgetfs]) from [<c00fd6a4>] (vfs_read+0xac/0x134)
[ 205.257232] [<c00fd6a4>] (vfs_read+0xac/0x134) from [<c00fd7d8>] (sys_read+0x3c/0x68)
[ 205.265411] [<c00fd7d8>] (sys_read+0x3c/0x68) from [<c0044540>] (ret_fast_syscall+0x0/0x3c)
Please help me solve this issue. I am now blocked at this point.
Thanks in advance,
Honey S