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 wifi on 3.12 kernel

Other Parts Discussed in Thread: AM3352

Hi,

My custom board is using AM3352 and 3.12 kernel. My usb port can emulate usb stick and keyboard/mouse without ant problems. However, when I tried to plug a usb wifi adapter, I got

[ 34.771594] Unable to handle kernel NULL pointer dereference at v irtual address 00000000
[ 34.780259] pgd = c0004000
[ 34.783115] [00000000] *pgd=00000000
[ 34.786898] Internal error: Oops: 17 [#1] SMP ARM
[ 34.791856] Modules linked in:
[ 34.795087] CPU: 0 PID: 46 Comm: kworker/0:1 Not tainted 3.12.30-01914-g53873 ab-dirty #1
[ 34.803628] Workqueue: events request_firmware_work_func
[ 34.809230] task: dd8da840 ti: dd928000 task.ti: dd928000
[ 34.814935] PC is at wiphy_register+0x54c/0x6d0
[ 34.819712] LR is at 0x7fffffff
[ 34.823022] pc : [<c07c1428>] lr : [<7fffffff>] psr: 600c0013
[ 34.823022] sp : dd929dd8 ip : 00000003 fp : dd929e34
[ 34.835111] r10: ddbd0120 r9 : 00000000 r8 : 0000002f
[ 34.840614] r7 : 00000000 r6 : c0be9b70 r5 : ddbd01cc r4 : ddbd0120
[ 34.847491] r3 : 00000000 r2 : 00000000 r1 : 0000000e r0 : 0000000e
[ 34.854373] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kern el
[ 34.862073] Control: 10c5387d Table: 9dc04019 DAC: 00000015
[ 34.868123] Process kworker/0:1 (pid: 46, stack limit = 0xdd928248)
[ 34.874725] Stack: (0xdd929dd8 to 0xdd92a000)
[ 34.879316] 9dc0: 00000 001 c0ffe880
[ 34.887937] 9de0: 00000000 dd928028 dd929e0c dd929df8 00000004 dde7fec0 e12ae 000 00000001
[ 34.896554] 9e00: 000080d0 00000000 dd929e34 ddbd0360 00000000 00000003 00000

======

It happens immediately I plug the USB wifi adapter. I tried many usb wifi adaptor and all got the same results.

I saw the kernel load the driver and corresponding firmware. Any suggestions?

-Eric

  • Hi Eric,

    I will forward this to the USB experts.

  • Biser,

    The seems not to be USB problem. We tried Atheros, Ralink and Realtek usb wifi adapter with the same result - so it's definitely not a driver issue.

    -Eric

  • Why don't you try some newer kernel? 3.18 for example. So far I had no problems with at least Ralink USB WiFi dongles. Look at am335x-evmsk.dts for example and make needed changes to your DTS file. But I can imagine, that you would be able to use your 3.12 DTS file.

  • Is a yocto/arago recipe available for 3.18 kernel? Or do you mean downloading and compiing a vanilla one?

    Thank you

  • Have no idea about Yocto, but I'm using Buildroot and the only thing I need to change is kernel's tarball URL or to change local.mk and point it local git clone. Manually compiling is also a solution.

  • I did try 3.15 kernel and the usb wifi adapter works fine. However, my client would like to use official release kernel from TI which is 3.12. And I think this forum support 3.12 only. I also tried to port the 3.15 usb wifi driver to 3.12. I got the same kernel oops.

    ======

    [ 2.793209] usb 1-1: Product: 802.11n WLAN Adapter
    [ 2.798300] usb 1-1: Manufacturer: Realtek
    [ 2.802626] usb 1-1: SerialNumber: 00e04c000001
    [ 2.811168] rtl8192cu: Chip version 0x10
    [ 2.961531] rtl8192cu: MAC address: 80:1f:02:ed:51:b3
    [ 2.967034] rtl8192cu: Board Type 0
    [ 2.984038] rtl_usb: rx_max_size 15360, rx_urb_num 8, in_ep 1
    [ 3.000579] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
    [ 3.021289] Unable to handle kernel NULL pointer dereference at virtual address 00000000
    [ 3.029974] pgd = c0004000
    [ 3.032834] [00000000] *pgd=00000000
    [ 3.036621] Internal error: Oops: 5 [#1] SMP ARM
    [ 3.041493] Modules linked in:
    [ 3.044731] CPU: 0 PID: 46 Comm: kworker/0:1 Not tainted 3.12.30-01914-g53873ab-dirty #20
    [ 3.053378] Workqueue: events request_firmware_work_func
    [ 3.058990] task: dd8da840 ti: dd928000 task.ti: dd928000
    [ 3.064696] PC is at wiphy_register+0x420/0x6e0
    [ 3.069477] LR is at 0x3
    [ 3.072152] pc : [<c05f32e4>] lr : [<00000003>] psr: 60030013
    [ 3.072152] sp : dd929dd8 ip : 00000000 fp : dd929e34
    [ 3.084261] r10: 00000003 r9 : 00000000 r8 : 0000035e
    [ 3.089772] r7 : c0948f80 r6 : ddb8c120 r5 : ddb8c12c r4 : 7fffffff
    [ 3.096657] r3 : 00000000 r2 : 00000000 r1 : 0000000e r0 : 0000000e
    [ 3.103545] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
    [ 3.111256] Control: 10c5387d Table: 9db6c019 DAC: 00000015
    [ 3.117318] Process kworker/0:1 (pid: 46, stack limit = 0xdd928248)
    [ 3.123929] Stack: (0xdd929dd8 to 0xdd92a000)
    [ 3.128528] 9dc0: 00000000 00000000
    [ 3.137160] 9de0: dd929e0c dd929df0 c00c05f4 c00c0428 00000002 00000004 dda64480 e08ec000
    [ 3.145792] 9e00: 000080d0 00000000 dd929e34 ddb8c360 00000000 0000002f 00000001 00000000
    [ 3.154424] 9e20: 00000000 00000003 dd929e8c dd929e38 c0611618 c05f2ed0 dd929e5c dd929e48
    [ 3.163055] 9e40: c03192cc ddb8cb8c ddb8c120 dd929e50 c08f3328 00000000 0000096c 00000000
    [ 3.171687] 9e60: 00000000 7fff7fff 00000000 ddb8c360 ddb8cce0 00000000 dd928000 00000000
    [ 3.180319] 9e80: dd929eb4 dd929e90 c038e5a0 c0611278 dda64900 dda64940 dda64900 dda64900
    [ 3.188951] 9ea0: c0d5d880 c0d60800 dd929edc dd929eb8 c031a1e4 c038e4f4 00000001 c00607cc
    [ 3.197583] 9ec0: 00000001 dda64940 dda64900 dd8d19c0 dd929f1c dd929ee0 c0060c40 c031a1b0
    [ 3.206214] 9ee0: dd929efc dd8d19c0 c0d5d894 dd8d19d8 dd928000 dd8d19c0 c0d5d894 dd8d19d8

    ========

    -Eric

  • Attached please find my log file.

    -Eric

  • Also my defconfig file.

    -Eric

  • Hi Eric,

    just show your customer this commit log for musb, so that he can see, how many fixes and infrastructural changes were made since 3.12.

    Btw. TI's master branch seems to work on 3.14 kernel.

  • Hi,

    It is quite annoying. When using 3.12 kernel with Yocto build rootfs, the usb wifi can work without problems. When using exactly the same kernel and modules with Ubuntu 14.04. The kernel crash immediately when USB wifi is plugged. My client would like to use aptitude manager and preferred Ubuntu. I suspect that it could be a cross compiler problem. I tried arm-linux-gcc 4.6, 4.7, 4.8 and 4.9. All got the same results.

    Regarding to switch mode in 3.14, my client report the Ethernet package of  RTP sitting on top of UDP. Also he can only capture one-way data in switch mode. There is no such problems in 3.12 kernel.  Any thought?

  • Regarding your switch issue, have you asked this question on the netdev mailing list? When asking always CC Mugunthan V N (see this commit for e-mail address).

    Does any of the latest commits seem to fix your issue?

  • Hello,

    Our understanding is that 3.12y is currently supported kernel. Can somebody from TI answer why we can't get ANY of tried USB WiFi dongles work? We tried Realtek, Ralink and Atheros so far, and all of them crash exactly at the same point on insertion (see Eric's files posted earlier). It is clear that it's not a driver. Can somebody from TI actually take a look at it and respond?

  • Common, guys. Anybody? Is it only us who see this problem?
  • Did you enable some phys in the 'PHY Device support and infrastructure' ? Do make menuconfig, select Device Drivers, select Network device support, make sure PHY Device support and infrastructure is selected, and then select it to see a list of phys to enable. I have tested with Atheros and Ralink with no problems.
    Steve K.
  • Steve,
    What rootfs didi you use for testing? The usb wifi can work with TI SDK 7 rootfs. It crashes on Ubuntu 14.04 or Debian7.
    -Eric