解决方案 »

  1.   

    在插上U盘,点击一下鼠标,串口打印的信息如下:
    [   92.103634] ------------[ cut here ]------------
    [   92.108792] kernel BUG at kernel/workqueue.c:1035!
    [   92.114128] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
    [   92.120623] Modules linked in: rtl8150 uvcvideo videobuf_dma_contig videobuf_core mali(O) ump(O) gpio_sunxi sun7i_ir nand(O)
    [   92.133173] CPU: 0    Tainted: G           O  (3.4.39 #5)
    [   92.139195] PC is at __queue_work+0x21c/0x2f0
    [   92.144047] LR is at __queue_work+0x208/0x2f0
    [   92.148899] pc : [<c0063d30>]    lr : [<c0063d1c>]    psr: 00000193
    [   92.148905] sp : eaac7e70  ip : 00000000  fp : 00000010
    [   92.161691] r10: d1d0bd00  r9 : 00000000  r8 : c075e9f8
    [   92.167510] r7 : ef02cdc0  r6 : c075ef48  r5 : 20000193  r4 : d1d08440
    [   92.174781] r3 : c075ef4c  r2 : 00000000  r1 : ef02cdc0  r0 : d1d0bd00
    [   92.182053] Flags: nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user
    [   92.190098] Control: 10c5387d  Table: 6bc0806a  DAC: 00000015  。。[   93.304434] Exception stack(0xeaac7fb0 to 0xeaac7ff8)
    [   93.310061] 7fa0:                                     4062a278 000002aa bead5854 444d8e6c
    [   93.319176] 7fc0: bead5854 00000000 4062a278 00000003 bead58f4 444cd000 443cac68 00000000
    [   93.328289] 7fe0: 4034bf74 bead5708 402f4f37 402faf2e 60000030 ffffffff
    [   93.335661] Code: e2863004 e1a0a000 e1520003 0a000000 (e7f001f2) 
    [   93.342452] ---[ end trace 26b348aad6cb27d8 ]---
    [   93.347597] Kernel panic - not syncing: Fatal exception in interrupt
    [   93.354679] CPU1: stopping
    [   93.357709] [<c00142a8>] (unwind_backtrace+0x0/0xe0) from [<c0012818>] (handle_IPI+0xf8/0x1d4)
    [   93.367318] [<c0012818>] (handle_IPI+0xf8/0x1d4) from [<c00084e0>] (gic_handle_irq+0x50/0x58)
    [   93.376828] [<c00084e0>] (gic_handle_irq+0x50/0x58) from [<c000d500>] (__irq_svc+0x40/0x70)
    [   93.386139] Exception stack(0xef05ff90 to 0xef05ffd8)
    [   93.391770] ff80:                                     00000001 01000000 00000000 00000000
    [   93.400892] ffa0: ef05e000 c0781c88 c04f89f8 c073e9d0 4000406a 410fc074 00000000 00000000
    [   93.410013] ffc0: 00000000 ef05ffd8 c000ea90 c000ea94 60000013 ffffffff
    [   93.417394] [<c000d500>] (__irq_svc+0x40/0x70) from [<c000ea94>] (default_idle+0x24/0x2c)
    [   93.426519] [<c000ea94>] (default_idle+0x24/0x2c) from [<c000ee08>] (cpu_idle+0x90/0xe4)
    [   93.435550] [<c000ee08>] (cpu_idle+0x90/0xe4) from [<404e9d54>] (0x404e9d54)
    [   93.443410] [hotplug]: cpu(0) try to kill cpu(1)
    [   94.440842] [hotplug]: try to kill cpu:1 failed!
      

  2.   

    在sw_udc.c中的sw_udc_probe_device_only中的最后return 0;之前添加如下代码试试
    #ifdef CONFIG_UDC_ACTIVE
    udc->udc_actived = 0;
    INIT_WORK(&udc->udc_active_work, udc_powernow_switch);
    init_timer(&udc->udc_active_timer);
    udc->udc_active_timer.fuction = udc_timer_func;
    #endif