Hi,
I'm trying to build and run USB composite gadgets on AM1808 Exp Kit board, using Linux Kernel 2.6.37 from PSP 3.21.0.4.
I've just modified kernel configuration to set USB MUSB Controller in peripheral mode, and compile USB gadgets as modules. But after loading g_cdc module (Composite Gadget. ETH+ACM) and configuring usb0 network interface, the system crashes with always the same backtrace that seems to refer to u_ether.c and MUSB code (see blue lines):
Unable to handle kernel paging request at virtual address ffff3800
pgd = c0004000
[ffff3800] *pgd=c3ffe031, *pte=00000000, *ppte=00000000
Internal error: Oops: 17 [#1] PREEMPT
last sysfs file: /sys/devices/platform/musb-da8xx/musb-hdrc/gadget/net/usb0/flags
Modules linked in: g_cdc ipv6 minix
CPU: 0 Not tainted (2.6.37 #8)
PC is at __kmalloc_track_caller+0x74/0xcc
LR is at __kmalloc_track_caller+0x48/0xcc
pc : [<c00b0578>] lr : [<c00b054c>] psr: a0000093
sp : c047fcd0 ip : c054c078 fp : c047fcfc
r10: 00000000 r9 : 00000001 r8 : bf05cac8
r7 : 00000020 r6 : a0000093 r5 : c3802500 r4 : ffff3800
r3 : 00000000 r2 : bf05cac8 r1 : 00000020 r0 : c3802500
Flags: NzCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 0005317f Table: c30e8000 DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc047e270)
Stack: (0xc047fcd0 to 0xc0480000)
...
Backtrace:
[<c00b0504>] (__kmalloc_track_caller+0x0/0xcc) from [<c02b20e4>] (__alloc_skb+0x58/0xf0)
r8:bf05cac8 r7:00000620 r6:00000020 r5:c305c6c0 r4:c3802180
[<c02b208c>] (__alloc_skb+0x0/0xf0) from [<bf05cac8>] (rx_submit+0xb8/0x1a4 [g_cdc])
[<bf05ca10>] (rx_submit+0x0/0x1a4 [g_cdc]) from [<bf05cf4c>] (rx_complete+0x250/0x258 [g_cdc])
[<bf05ccfc>] (rx_complete+0x0/0x258 [g_cdc]) from [<c02556d0>] (musb_g_giveback+0x150/0x188)
[<c0255580>] (musb_g_giveback+0x0/0x188) from [<c0256700>] (musb_g_rx+0x228/0x290)
r7:c385ed1c r6:c3811320 r5:c3118ec0 r4:00002000
[<c02564d8>] (musb_g_rx+0x0/0x290) from [<c02525e4>] (musb_dma_completion+0x94/0x9c)
[<c0252550>] (musb_dma_completion+0x0/0x9c) from [<c02594f8>] (cppi41_completion+0x154/0x368)
r6:00000000 r5:c385ec00 r4:c385ec00
[<c02593a4>] (cppi41_completion+0x0/0x368) from [<c0257cbc>] (da8xx_musb_interrupt+0xa8/0x264)
[<c0257c14>] (da8xx_musb_interrupt+0x0/0x264) from [<c007b7b4>] (handle_IRQ_event+0x2c/0xfc)
[<c007b788>] (handle_IRQ_event+0x0/0xfc) from [<c007dd10>] (handle_edge_irq+0x15c/0x1cc)
r7:0000003a r6:c387fc00 r5:c047e000 r4:c048bc34
[<c007dbb4>] (handle_edge_irq+0x0/0x1cc) from [<c003207c>] (asm_do_IRQ+0x7c/0xa0)
r8:00000001 r7:00000002 r6:04000000 r5:00000000 r4:0000003a
[<c0032000>] (asm_do_IRQ+0x0/0xa0) from [<c0032bec>] (__irq_svc+0x4c/0x9c)
Exception stack(0xc047fef8 to 0xc047ff40)
fee0: 0007a0c0 00001f40
ff00: 00000000 20000013 c0488194 c04881a0 c0481bd4 c04a8a70 c04c2ed4 41069265
ff20: c0028ac4 c047ff64 1dcbf2ff c047ff40 c006c73c c003f914 20000013 ffffffff
r5:febfd000 r4:ffffffff
[<c003f89c>] (davinci_enter_idle+0x0/0xa0) from [<c02707b8>] (cpuidle_idle_call+0xbc/0x11c)
r4:c0488210
[<c02706fc>] (cpuidle_idle_call+0x0/0x11c) from [<c0034158>] (cpu_idle+0x74/0xe4)
r8:c0028af8 r7:c04a8a70 r6:c0481bd4 r5:c0481da0 r4:c047e000
[<c00340e4>] (cpu_idle+0x0/0xe4) from [<c036f4e4>] (rest_init+0x8c/0xa4)
r7:c0481bc8 r6:c002a380 r5:c04a8a3c r4:c047e000
[<c036f458>] (rest_init+0x0/0xa4) from [<c0008a14>] (start_kernel+0x284/0x2e4)
r4:c04b057c
[<c0008790>] (start_kernel+0x0/0x2e4) from [<c0008034>] (stext+0x34/0x3c)
r6:c002a784 r5:c04a8a98 r4:00053175
Code: e595c000 e59c4000 e3540000 15953010 (17943003)
...
The same happens with a "reduced" version of Multi Gadget (g_multi ETH+MSC), where I removed ACM due to AM1808 limitation on number of eps.
I had to do a minor change in f_rndis.c but I do not think this is the point because using the simple gadget g_ether I have no problem. I had to comment out next lines (as they are in standard kernel) due to a compilation issue:
#if 0
if (rndis_set_param_vendor(rndis->config, vendorID,
manufacturer))
goto fail;
#endif
Does anybody test USB composite gadgets on TI platforms?
Could it be to an (HW) limitation of MUSB Controller?
Or could someone give any hint or suggestion?
Thanks in advance. Regards,
Max