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.

Linux/PROCESSOR-SDK-AM335X: Kernel panic hot unplugging USB WI-FI adapter

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Linux

Using SDK 7.0, Linux kernel 3.12, when hot unplugging a USB Wi-Fi adapter the kernel occasionally panics.  Here is the output of the panic:

root@Node00b01973d7b4:~# [ 5679.169443] Unable to handle kernel paging request at virtual address fffffff8

[ 5679.177038] pgd = c0004000

[ 5679.179871] [fffffff8] *pgd=8fcf2821, *pte=00000000, *ppte=00000000

[ 5679.186467] Internal error: Oops: 17 [#1] ARM

[ 5679.191031] Modules linked in: stkChk cmv apm rt2800usb rt2800lib crc_ccitt rt2x00usb rt2x00lib mac80211 usb_f_ecm g_ether usb_f_rndis u_rndis libcomposite u_ether cfg80211 musb_dsps musb_hdrc snd_soc_audtel snd_soc_cpld snd_soc_davinci_mcasp snd_soc_davinci snd_soc_gcpld snd_soc_gaudtel snd_soc_core regmap_spi serial9bitdriver musb_am335x snd_pcm snd_timer snd_page_alloc snd_compress snd soundcore

[ 5679.228160] CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.10-Edwards.00.00.17-ti2013.12.01 #2

[ 5679.237003] task: c07dc098 ti: c07d0000 task.ti: c07d0000

[ 5679.242713] PC is at musb_g_rx+0x88/0x128 [musb_hdrc]

[ 5679.248014] LR is at musb_interrupt+0xa4/0x95c [musb_hdrc]

[ 5679.253766] pc : [<bf1a3cdc>]    lr : [<bf19dbb4>]    psr: 200f0193

[ 5679.253766] sp : c07d1d80  ip : 00000000  fp : c07d1da4

[ 5679.265801] r10: d1a56d26  r9 : 00000000  r8 : 00000019

[ 5679.271275] r7 : 00000000  r6 : cc12c4b8  r5 : cc12c010  r4 : cc12c470

[ 5679.278116] r3 : d1a56d20  r2 : 00002000  r1 : ffffffcc  r0 : ffffffcc

[ 5679.284962] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment kernel

[ 5679.292711] Control: 10c5387d  Table: 8c294019  DAC: 00000017

[ 5679.298733] Process swapper (pid: 0, stack limit = 0xc07d0240)

[ 5679.304844] Stack: (0xc07d1d80 to 0xc07d2000)

[ 5679.309413] 1d80: 00000001 00000002 cc12c010 00000001 00000019 00000000 c07d1dec c07d1da8

[ 5679.317987] 1da0: bf19dbb4 bf1a3c60 0003a980 00000000 a66e0000 0098944a a6b0e000 0098944a

[ 5679.326561] 1dc0: 2a9bfc00 bf1b0128 cc12c010 00000000 d1a58800 a00f0193 00000001 cd7bb840

[ 5679.335133] 1de0: c07d1e24 c07d1df0 bf1af970 bf19db1c 0000052a 00000000 c07d1e54 cc56eb00

[ 5679.343703] 1e00: 00000023 00000000 00000000 00000023 c085e695 cd005340 c07d1e5c c07d1e28

[ 5679.352279] 1e20: c007162c bf1af7b8 c007ec54 c0078b28 00000001 cd005340 00000023 00000000

[ 5679.360852] 1e40: 00000023 00000000 413fc082 c085e693 c07d1e74 c07d1e60 c00717c0 c00715e4

[ 5679.369428] 1e60: 00024000 cd005340 c07d1e8c c07d1e78 c0073b78 c007179c c0073af0 00000023

[ 5679.378001] 1e80: c07d1ea4 c07d1e90 c0070f34 c0073afc 00000110 c082e874 c07d1ec4 c07d1ea8

[ 5679.386574] 1ea0: c00154e0 c0070f18 00000080 fa200000 c07d1ee8 c085f56c c07d1ee4 c07d1ec8

[ 5679.395149] 1ec0: c000879c c00154b4 c0452fa0 200f0013 ffffffff c07d1f1c c07d1f5c c07d1ee8

[ 5679.403722] 1ee0: c05a2580 c0008740 c07d1f30 3b9aca00 00701d81 0000052a 34d8f77f 0000052a

[ 5679.412296] 1f00: c084bbb8 00000001 00000000 413fc082 c085e693 c07d1f5c 0000001a c07d1f30

[ 5679.420869] 1f20: c00779a8 c0452fa0 200f0013 ffffffff 35491500 0000052a 00000000 c07df528

[ 5679.429441] 1f40: c084bbb8 00000001 c07df528 c08901c4 c07d1f84 c07d1f60 c04530d8 c0452f50

[ 5679.438013] 1f60: 00000000 c07d0000 00000000 c07d8104 c085e693 00000001 c07d1f94 c07d1f88

[ 5679.446591] 1f80: c00156b0 c0453040 c07d1fac c07d1f98 c0070df0 c00156ac 00000000 c0aabd80

[ 5679.455165] 1fa0: c07d1fbc c07d1fb0 c0598d50 c0070da4 c07d1ff4 c07d1fc0 c0778a04 c0598cf8

[ 5679.463738] 1fc0: ffffffff ffffffff c0778544 00000000 00000000 c07b46f0 10c53c7d c07d80a8

[ 5679.472314] 1fe0: c07b46ec c07dd138 00000000 c07d1ff8 80008070 c07787b4 00000000 00000000

[ 5679.480884] Backtrace:

[ 5679.483478] [<bf1a3c54>] (musb_g_rx+0x0/0x128 [musb_hdrc]) from [<bf19dbb4>] (musb_interrupt+0xa4/0x95c [musb_hdrc])

[ 5679.494530] [<bf19db10>] (musb_interrupt+0x0/0x95c [musb_hdrc]) from [<bf1af970>] (dsps_interrupt+0x1c4/0x2dc [musb_dsps])

[ 5679.506126] [<bf1af7ac>] (dsps_interrupt+0x0/0x2dc [musb_dsps]) from [<c007162c>] (handle_irq_event_percpu+0x54/0x1b8)

[ 5679.517346] [<c00715d8>] (handle_irq_event_percpu+0x0/0x1b8) from [<c00717c0>] (handle_irq_event+0x30/0x40)

[ 5679.527562] [<c0071790>] (handle_irq_event+0x0/0x40) from [<c0073b78>] (handle_level_irq+0x88/0xdc)

[ 5679.537044]  r4:cd005340 r3:00024000

[ 5679.540802] [<c0073af0>] (handle_level_irq+0x0/0xdc) from [<c0070f34>] (generic_handle_irq+0x28/0x38)

[ 5679.550461]  r4:00000023 r3:c0073af0

[ 5679.554233] [<c0070f0c>] (generic_handle_irq+0x0/0x38) from [<c00154e0>] (handle_IRQ+0x38/0x8c)

[ 5679.563350]  r4:c082e874 r3:00000110

[ 5679.567108] [<c00154a8>] (handle_IRQ+0x0/0x8c) from [<c000879c>] (omap3_intc_handle_irq+0x68/0x7c)

[ 5679.576499]  r6:c085f56c r5:c07d1ee8 r4:fa200000 r3:00000080

[ 5679.582460] [<c0008734>] (omap3_intc_handle_irq+0x0/0x7c) from [<c05a2580>] (__irq_svc+0x40/0x54)

[ 5679.591759] Exception stack(0xc07d1ee8 to 0xc07d1f30)

[ 5679.597052] 1ee0:                   c07d1f30 3b9aca00 00701d81 0000052a 34d8f77f 0000052a

[ 5679.605624] 1f00: c084bbb8 00000001 00000000 413fc082 c085e693 c07d1f5c 0000001a c07d1f30

[ 5679.614195] 1f20: c00779a8 c0452fa0 200f0013 ffffffff

[ 5679.619486]  r7:c07d1f1c r6:ffffffff r5:200f0013 r4:c0452fa0

[ 5679.625445] [<c0452f44>] (cpuidle_enter_state+0x0/0xf0) from [<c04530d8>] (cpuidle_idle_call+0xa4/0x148)

[ 5679.635382]  r7:c08901c4 r6:c07df528 r5:00000001 r4:c084bbb8

[ 5679.641334] [<c0453034>] (cpuidle_idle_call+0x0/0x148) from [<c00156b0>] (arch_cpu_idle+0x10/0x4c)

[ 5679.650725]  r8:00000001 r7:c085e693 r6:c07d8104 r5:00000000 r4:c07d0000

r3:00000000

[ 5679.658959] [<c00156a0>] (arch_cpu_idle+0x0/0x4c) from [<c0070df0>] (cpu_startup_entry+0x58/0xf4)

[ 5679.668273] [<c0070d98>] (cpu_startup_entry+0x0/0xf4) from [<c0598d50>] (rest_init+0x64/0x7c)

[ 5679.677206]  r7:c0aabd80 r3:00000000

[ 5679.680969] [<c0598cec>] (rest_init+0x0/0x7c) from [<c0778a04>] (start_kernel+0x25c/0x2a8)

[ 5679.689637] [<c07787a8>] (start_kernel+0x0/0x2a8) from [<80008070>] (0x80008070)

[ 5679.697389] Code: e3c22004 e283a006 e6ff2072 e1ca20b0 (e51c8008)

[ 5679.703784] ---[ end trace 3cb42141a175ef8a ]---

[ 5679.708619] Kernel panic - not syncing: Fatal exception in interrupt

 

  • Tim,

    Tim Potter said:
    [ 5679.242713] PC is at musb_g_rx+0x88/0x128 [musb_hdrc]

    If your kernel has debug symbol enabled, please follow the instruction below to get the location of the source code which causes the kernel crash, and send me the output of gdb.

    Run the following on PC.

    $ gdb drivers/usb/musb/musb_hdrc.ko
    (gdb) list *(musb_g_rx+0x88)

  • Here you go:

    Reading symbols from /media/33827ac5-8e83-4855-b681-c4a081115ad2/ti-sdk-am335x-evm-07.00.00.00/board-support/dev/drivers/usb/musb/musb_hdrc.ko...done.

    (gdb) list *(musb_g_rx+0x88)

    0x7cdc is in musb_g_rx (drivers/usb/musb/musb_gadget.c:873).

    868 /* csr |= MUSB_RXCSR_P_WZC_BITS; */

    869 csr &= ~MUSB_RXCSR_P_OVERRUN;

    870 musb_writew(epio, MUSB_RXCSR, csr);

    871

    872 dev_dbg(musb->controller, "%s iso overrun on %p\n", musb_ep->name, request);

    873 if (request->status == -EINPROGRESS)

    874 request->status = -EOVERFLOW;

    875 }

    876 if (csr & MUSB_RXCSR_INCOMPRX) {

    877 /* REVISIT not necessarily an error */

  • Tim,

    Thanks for the log, I believe the patch 7.3.a in the link below should fix the issue. Please test it and let me know.

     

    BTY, it is recommended to apply all the 7.2~7.7 and 8.1, 8.3, 8.4 patches in the link above to 3.12 kernel.

  • Tim, did patch 7.3a resolve the issue?
  • It does appear that this patch took care of the problem.

    Thank you!