BCMDHD driver porting on Kernel-4.1: Kernel Panic

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BCMDHD driver porting on Kernel-4.1: Kernel Panic

3,295 Views
anilhani
Contributor II

Hi All,

 

Hardware : Freescale i.MX6 Quad/DualLite (Device Tree)

OS: Linux kernel- 4.1.15

Chipset: BCM89335/BCM4339

 

A latest bcmdhd source drop is received for 4.1.15 kernel.  As per HW schematic, the gpio1_30 is connected to WLAN_PD and gpio5_26 connected to WLAN_HOST_WAKE, which is used for interrupt source. We are trying to use an OOB interrupt mode - using either edge trigger or level trigger on gpio interrupt.

 

I could see see the bcm chip gets power up, driver detects the chip and loads the FW/NVRAM file. The WiFi interface gets created but a kernel panic is observed post wifi interface up is called. Please find the details related to dts changes for sdhc2(connected to bcm chip) and bcmdhd wlan module node.  Let me know if any modifications are required,

 

DTS Modifications.

/ {   

    regulators {

             wlreg_on: fixedregulator@100 {

                 compatible = "regulator-fixed";

                 regulator-name = "wlreg_on";

                 gpio = <&gpio1 30 0>;

                 startup-delay-us = <100>;

                 enable-active-high;

             };

    };

 

    bcmdhd_wlan_0: bcmdhd_wlan@0 {

        compatible = "android,bcmdhd_wlan";

        interrupt-parent = <&gpio5>;

        interrupts = <26 4>;          // IRQ_TYPE_LEVEL_HIGH

        gpios = <&gpio5 26 1>;

        wlreg_on-supply = <&wlreg_on>;

    };

};

 

&iomuxc {

                pinctrl_usdhc2: usdhc2grp {

                        fsl,pins = <

                                MX6QDL_PAD_SD2_CMD__SD2_CMD             0x17059

                                MX6QDL_PAD_SD2_CLK__SD2_CLK               0x10059

                                MX6QDL_PAD_SD2_DAT0__SD2_DATA0          0x17059

                                MX6QDL_PAD_SD2_DAT1__SD2_DATA1          0x17059

                                MX6QDL_PAD_SD2_DAT2__SD2_DATA2          0x17059

                                MX6QDL_PAD_SD2_DAT3__SD2_DATA3          0x17059

                                MX6QDL_PAD_ENET_TXD0__GPIO1_IO30       0x80000000

                                MX6QDL_PAD_CSI0_DAT8__GPIO5_IO26         0x80000000

                        >;

                };

} ;

 

&usdhc2 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_usdhc2>;

        bus-width = <4>;

        non-removable;

        no-1-8-v;

        cd-post;

        pm-ignore-notify;

        wifi-host;

        status = "okay";

};

  

 

The kernel crash reported post wlan interface up and PFA dmesg logs.

root@orinoco-9939-a1:~# ifconfig wlan0 up

root@orinoco-9939-a1:~# [   52.793936] Unable to handle kernel NULL pointer dereference at virtual address 00000054

[   52.802080] pgd = 80004000

[   52.804808] [00000054] *pgd=00000000

[   52.808406] Internal error: Oops - BUG: 17 [#1] SMP ARM

[   52.813637] Modules linked in: bcmdhd cfg80211 snd_soc_fsl_ssi snd_soc_fsl_esai imx_pcm_dma snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ci_hdrc_imx usbmisc_imx ci_hdrc atmel_mxt_ts ehci_hcd ipv6 input_polldev uinput usbcore

[   52.836539] CPU: 0 PID: 365 Comm: dhd_dpc Not tainted 4.1.15+ #4

[   52.842548] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)

[   52.849080] task: 88c7cb00 ti: 889aa000 task.ti: 889aa000

[   52.854667] PC is at dhdsdio_sendfromq+0x150/0x34c [bcmdhd]

[   52.860404] LR is at dhdsdio_sendfromq+0x144/0x34c [bcmdhd]

[   52.865983] pc : [<7f22e624>]    lr : [<7f22e618>]    psr: 60070013

[   52.865983] sp : 889abde0  ip : 889abde0  fp : 889abea4

[   52.877464] r10: 0000005a  r9 : 88afb060  r8 : 0000001d

[   52.882692] r7 : 00000001  r6 : 88c64000  r5 : 00000001  r4 : 88afb000

[   52.889222] r3 : 00000008  r2 : 889abdf8  r1 : ffffffff  r0 : 00000000

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

[   52.903068] Control: 10c53c7d  Table: 187b404a  DAC: 00000015

[   52.908817] Process dhd_dpc (pid: 365, stack limit = 0x889aa210)

[   52.914827] Stack: (0x889abde0 to 0x889ac000)

[   52.919192] bde0: 889abe0c 00000014 18005000 000000ff 00000007 8007e1a4 00000000 80719640

[   52.927376] be00: 889abe24 8043eb48 889abe24 889abe18 8043eb48 8003445c 889abe3c 889abe28

[   52.935560] be20: 7f1e5360 8043eb1c 00000000 00000000 889abea4 889abe40 7f226660 7f1e5330

[   52.943745] be40: 7f1e7c34 8043e748 889abe7c 889abe58 7f1eb0a4 7f1e7c14 88afb000 00000000

[   52.951928] be60: 7f228520 00000003 00000001 00000000 889abea4 889abe80 7f229598 88afb000

[   52.960112] be80: 00000000 7f24d49c 88c678c4 88e7ca00 00000000 00000000 889abf2c 889abea8

[   52.968296] bea0: 7f2329a4 7f22e4e0 00000000 800513cc 88c67860 7f251d5c 00000000 00000032

[   52.976479] bec0: 18005000 00000014 019abf0c a0000093 889abef4 7f1e7c34 889abef4 889abee8

[   52.984664] bee0: 7f1e7c34 8043e748 889abf1c 889abef8 7f1eb0a4 7f1e7c14 88c64000 88c678b0

[   52.992847] bf00: 88c678e8 88c64000 88c678b0 88c678e8 88c678c4 60000013 00000000 00000000

[   53.001031] bf20: 889abf5c 889abf30 7f1eb1d4 7f231fb0 00000000 00000001 88bbcf40 00000000

[   53.009215] bf40: 88c678b0 7f1eb0f0 00000000 00000000 889abfac 889abf60 80049d24 7f1eb0fc

[   53.017399] bf60: e3a05000 00000000 0a000001 88c678b0 00000000 00000000 889abf78 889abf78

[   53.025582] bf80: 00000000 00000000 889abf88 889abf88 88bbcf40 80049c3c 00000000 00000000

[   53.033765] bfa0: 00000000 889abfb0 8000f168 80049c48 00000000 00000000 00000000 00000000

[   53.041948] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

[   53.050131] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 e5963000 e3130002

[   53.058308] Backtrace:

[   53.061074] [<7f22e4d4>] (dhdsdio_sendfromq [bcmdhd]) from [<7f2329a4>] (dhd_bus_dpc+0xa00/0xed4 [bcmdhd])

[   53.070731]  r10:00000000 r9:00000000 r8:88e7ca00 r7:88c678c4 r6:7f24d49c r5:00000000

[   53.078633]  r4:88afb000

[   53.081428] [<7f231fa4>] (dhd_bus_dpc [bcmdhd]) from [<7f1eb1d4>] (dhd_dpc_thread+0xe4/0x134 [bcmdhd])

[   53.090736]  r10:00000000 r9:00000000 r8:60000013 r7:88c678c4 r6:88c678e8 r5:88c678b0

[   53.098637]  r4:88c64000

[   53.101287] [<7f1eb0f0>] (dhd_dpc_thread [bcmdhd]) from [<80049d24>] (kthread+0xe8/0xfc)

[   53.109381]  r9:00000000 r8:00000000 r7:7f1eb0f0 r6:88c678b0 r5:00000000 r4:88bbcf40

[   53.117209] [<80049c3c>] (kthread) from [<8000f168>] (ret_from_fork+0x14/0x2c)

[   53.124432]  r7:00000000 r6:00000000 r5:80049c3c r4:88bbcf40

[   53.130153] Code: ebff071a e24b20ac e7820107 e2877001 (e5902054)

Original Attachment has been moved to: dmesg_latest.zip

Labels (4)
0 Kudos
3 Replies

1,107 Views
kai_wang
Contributor II

Hi Anilkumar 

How do you fix the function unsupported in the bcmdhd driver for kernel 4.1.15?

0 Kudos

1,107 Views
igorpadykov
NXP Employee
NXP Employee

Hi Anilkumar

when biulding image one can check flags [linux/drivers/net/wireless/bcmdhd/]

defined(OOB_INTR_ONLY) 

defined (HW_OOB)

and post issue on bcmdhd vendor support

http://wireless.murata.com/eng/products/rf-modules-1/wi-fi-bluetooth-for-freescale-i-mx.html

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,107 Views
fulinux
Contributor IV

Hi  igor,

I also encountered bcmdhd driver porting problem has not been resolved with my bcm4336, i am a new hand, would you give me an example of the bcmdhd driver for kernel 4.1.15?

thanks.

fulinux

0 Kudos