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.

USB Host controller can' t support to load the USB WIFI module.

Other Parts Discussed in Thread: AM3352

Now we are developing the USB WIFI module on the AM3352 platform and we have found  two problems:

1. On the usb callback function, if we malloc 64KB memory, the system will crash, but if we don't use the callback function, we can malloc 1MB memory.

2. On the usb callback function, the urb request just can be raised only once, if we  raised again, the system will be dead.

following is the log information:

[  104.559387] wmi connect failed!host_htc_rdy_handler failed!

[  104.565032] ath_usb_probe: MpHtcAttach fail!

[  104.569671] MpHtcDetach: MpWmiStop

[  104.573211] HIF_USBDeviceDetached

[  104.576660] HTCTargetRemovedHandler: cancel htc waiting.

[  104.582214] athLnxUsbRegOut_callback###774#######0#####-821450304

[  104.588592] HIF_UsbCmdOut_Callback###70

[  104.592590] Unable to handle kernel NULL pointer dereference at virtual address 00000004

[  104.601043] pgd = c0004000

[  104.603851] [00000004] *pgd=00000000

[  104.607604] Internal error: Oops: 17 [#1]

[  104.611755] Modules linked in: vt9271(O+)

[  104.615966] CPU: 0    Tainted: GF          O  (3.2.0 #1)

[  104.622039] PC is at HIF_UsbCmdOut_Callback+0x2c/0x3c [vt9271]

[  104.628143] LR is at console_unlock+0x170/0x1f8

[  104.632873] pc : [<bf004df8>]    lr : [<c003ed50>]    psr: 60000013

[  104.632873] sp : cf84de90  ip : cf84dd88  fp : cf84dea4

[  104.644836] r10: cf90ce05  r9 : cf9082e4  r8 : c02ba744

[  104.650268] r7 : 00000000  r6 : cf33ae20  r5 : cf09a9c0  r4 : 00000000

[  104.657073] r3 : c0600788  r2 : c0600788  r1 : 00000000  r0 : 0000002e

[  104.663879] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

[  104.671508] Control: 10c5387d  Table: 8f0dc019  DAC: 00000015

[  104.677490] Process kworker/u:1 (pid: 8, stack limit = 0xcf84c2f0)

[  104.683929] Stack: (0xcf84de90 to 0xcf84e000)

[  104.688476] de80:                                     cf33afa0 cf09a9c0 cf84decc cf84dea8

[  104.696990] dea0: bf024d5c bf004dd8 cf09a9c0 00000000 cf84decc cfb69740 00000000 cf9080e8

[  104.705535] dec0: cf84dee4 cf84ded0 c029f630 bf024ce4 cfb69740 00000000 cf84df34 cf84dee8

[  104.714050] dee0: c02b8be0 c029f5e4 cf84df1c cf84def8 c005c0ac c001954c ffffffff cf07401c

[  104.722564] df00: cf81a8c0 cf84c000 cf9de6c0 cf9080e8 cf90ce00 cf84c000 00000000 c02ba744

[  104.731109] df20: cf9082e4 cf90ce05 cf84df4c cf84df38 c02ba75c c02b8bac 60000013 cf8174c0

[  104.739624] df40: cf84df84 cf84df50 c0051138 c02ba750 c065902c cf8174d0 c0659028 cf8174c0

[  104.748168] df60: c065902c cf8174d0 c0659028 cf84c000 00000089 c0601c2c cf84dfbc cf84df88

[  104.756683] df80: c0052fb0 c0051020 cf8174c0 c0052e54 00000013 cf835ee0 cf8174c0 c0052e54

[  104.765228] dfa0: 00000013 00000000 00000000 00000000 cf84dff4 cf84dfc0 c0056fc8 c0052e60

[  104.773742] dfc0: cf835ee0 00000000 cf8174c0 00000000 cf84dfd0 cf84dfd0 00000000 cf835ee0

[  104.782257] dfe0: c0056f38 c0041724 00000000 cf84dff8 c0041724 c0056f44 80a040b0 000c0005

[  104.790802] Backtrace:

[  104.793762] [<bf004dcc>] (HIF_UsbCmdOut_Callback+0x0/0x3c [vt9271]) from [<bf024d5c>] (athLnxUsbRegOut_callback+0x84/0x88 [vt9271])

[  104.806091]  r5:cf09a9c0 r4:cf33afa0

[  104.809997] [<bf024cd8>] (athLnxUsbRegOut_callback+0x0/0x88 [vt9271]) from [<c029f630>] (usb_hcd_giveback_urb+0x58/0xc8)

[  104.821350]  r6:cf9080e8 r5:00000000 r4:cfb69740

[  104.826171] [<c029f5d8>] (usb_hcd_giveback_urb+0x0/0xc8) from [<c02b8be0>] (musb_giveback+0x40/0xac)

[  104.835693]  r5:00000000 r4:cfb69740

[  104.839447] [<c02b8ba0>] (musb_giveback+0x0/0xac) from [<c02ba75c>] (musb_gb_work+0x18/0x34)

[  104.848236] [<c02ba744>] (musb_gb_work+0x0/0x34) from [<c0051138>] (process_one_work+0x124/0x384)

[  104.857482]  r4:cf8174c0 r3:60000013

[  104.861236] [<c0051014>] (process_one_work+0x0/0x384) from [<c0052fb0>] (worker_thread+0x15c/0x330)

[  104.870666] [<c0052e54>] (worker_thread+0x0/0x330) from [<c0056fc8>] (kthread+0x90/0x94)

[  104.879119] [<c0056f38>] (kthread+0x0/0x94) from [<c0041724>] (do_exit+0x0/0x67c)

[  104.886901]  r6:c0041724 r5:c0056f38 r4:cf835ee0

[  104.891723] Code: e34b1f0a e3a02046 e34b0f0d eb507c01 (e9940009)

======================================