Commits
Dong Aisheng committed 0ddfa5cad85
MLK-12462 mmc: sdhci-esdhc-imx: only force remove for available cards Do sanity check before calling mmc_force_remove. BCM WiFi driver will call wifi_card_detect(false) if probe fails due to no card exists on board. This is needed for Android BSP since Android has builtin WiFi drver and some boards may not have WiFi cards pluged. Then the kernel dump likes follows may appear. ---------------------------------------------- dhd_module_init in Power-up adapter 'DHD generic adapter' wifi_platform_bus_enumerate device present 1 mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz mmc1: mmc_rescan_try_freq: trying to init card at 300000 Hz mmc1: mmc_rescan_try_freq: trying to init card at 200000 Hz mmc1: mmc_rescan_try_freq: trying to init card at 100000 Hz failed to power up DHD generic adapter, 3 retry left wifi_platform_bus_enumerate device present 0 ------------[ cut here ]------------ Kernel BUG at 8051247c [verbose debug info unavailable] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Modules linked in: bcmdhd(+) ov5642_camera ov5640_camera_mipi_int ov5640_camera_int mxc_v4l2_capture ipu_bg_overlay_sdc ipu_still v4l2_int_device mxc_dcic ipu_prp_enc ipu_csi_enc ipu_fg_overlay_sdc evbug CPU: 3 PID: 1071 Comm: modprobe Not tainted 4.1.15-01591-g1393481 #1504 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) task: a99be880 ti: a8dd8000 task.ti: a8dd8000 PC is at mmc_sdio_remove+0x70/0x74 LR is at mmc_sdio_force_remove+0xc/0x34 pc : [<8051247c>] lr : [<8051248c>] psr: 60070013 sp : a8dd9d00 ip : 00000000 fp : 00000000 r10: 7f100c98 r9 : 00000000 r8 : 7f0fc410 r7 : a8dd9d48 r6 : a83b1800 r5 : 00000000 r4 : a83b1800 r3 : 00000000 r2 : 00000000 r1 : 809b50c8 r0 : 00000000 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user Control: 10c53c7d Table: 38cdc04a DAC: 00000015 Process modprobe (pid: 1071, stack limit = 0xa8dd8210) Stack: (0xa8dd9d00 to 0xa8dda000) 9d00: 00000000 a83b1800 00000000 00000000 a8dd9d48 8051248c 00000000 7f0ca6cc 9d20: a99be880 a90e6280 00000003 7f0ca920 fffffdfb a81af810 80bb570c 00000000 9d40: 00020002 00000000 a8dd9d48 a8dd9d48 00000000 7f100c98 7f100c98 a90e6280 9d60: fffffdfb 00000008 00000000 7f0fe490 56f19f1c 7f0cabe4 80bb6d74 a81af810 9d80: 7f0fe248 8037f864 8037f820 80bb6d74 a81af810 00000000 7f0fe248 8037e118 9da0: a81af810 7f0fe248 a81af844 80b1e8b0 00000000 8037e328 00000000 7f0fe248 9dc0: 8037e29c 8037c660 a8025c5c a8187a34 7f0fe248 a9547780 00000000 8037d8b4 9de0: 7f0f5028 7f0fe248 00000000 7f0fe248 00000000 a90e6280 80ba78f4 8037e92c 9e00: 00000000 7f100c98 00000000 7f0cb02c 00000000 80af7720 80af7720 a90e6280 9e20: 7f124000 00000000 00000001 80009730 00000000 8040003b abc7db80 800e1c68 9e40: 00000000 a935c340 8040003a abc83180 ab757000 80af257c 00000001 8040003a 9e60: 00000001 00000001 a8dd9e7c 80af2260 a8001f00 80af46c0 56f19f1c 800e32a0 9e80: 7f0fe448 a90e6108 a90e6240 7f0fe448 a90e6100 7f0fe490 56f19f1c 8078b2b0 9ea0: 7f0fe448 a90e6100 a8dd9f58 a90e6108 00000001 80092dd8 7f0fe454 00007fff 9ec0: 800902a8 a8928900 7f0fe490 00000000 7f0fe590 000015fa c1754bfc 7f0fe590 9ee0: c16d8000 000c823c 05de516a 00000000 0000000e 00000000 00000000 00000000 9f00: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 9f20: 00000000 00000000 00000000 00000000 00000648 00000000 00000003 01111348 9f40: 0000017b 8000f644 a8dd8000 00000000 00000073 8009352c c16d8000 000c823c 9f60: c175456c c17543a5 c17957ec 0007ad30 0008f7c0 00000000 00000000 00000000 9f80: 0000002a 0000002b 0000001f 00000023 00000014 00000000 01111348 00000000 9fa0: 00000000 8000f4c0 01111348 00000000 00000003 01111348 00000000 00040000 9fc0: 01111348 00000000 00000000 0000017b 00000000 01111218 00000073 00000073 9fe0: 7ec5d950 7ec5d940 0001f0dc 76ecf610 600d0010 00000003 00000000 00000000 [<8051247c>] (mmc_sdio_remove) from [<8051248c>] (mmc_sdio_force_remove+0xc/0x34) [<8051248c>] (mmc_sdio_force_remove) from [<7f0ca6cc>] (wifi_platform_bus_enumerate+0x54/0x90 [bcmdhd]) [<7f0ca6cc>] (wifi_platform_bus_enumerate [bcmdhd]) from [<7f0ca920>] (dhd_wifi_platform_load+0x17c/0x39c [bcmdhd]) [<7f0ca920>] (dhd_wifi_platform_load [bcmdhd]) from [<7f0cabe4>] (wifi_plat_dev_drv_probe+0xa4/0x124 [bcmdhd]) [<7f0cabe4>] (wifi_plat_dev_drv_probe [bcmdhd]) from [<8037f864>] (platform_drv_probe+0x44/0xa4) [<8037f864>] (platform_drv_probe) from [<8037e118>] (driver_probe_device+0x174/0x2b4) [<8037e118>] (driver_probe_device) from [<8037e328>] (__driver_attach+0x8c/0x90) [<8037e328>] (__driver_attach) from [<8037c660>] (bus_for_each_dev+0x6c/0xa0) [<8037c660>] (bus_for_each_dev) from [<8037d8b4>] (bus_add_driver+0x148/0x1f0) [<8037d8b4>] (bus_add_driver) from [<8037e92c>] (driver_register+0x78/0xf8) [<8037e92c>] (driver_register) from [<7f0cb02c>] (dhd_wifi_platform_register_drv+0x1cc/0x20c [bcmdhd]) [<7f0cb02c>] (dhd_wifi_platform_register_drv [bcmdhd]) from [<80009730>] (do_one_initcall+0x8c/0x1d4) [<80009730>] (do_one_initcall) from [<8078b2b0>] (do_init_module+0x5c/0x1a8) [<8078b2b0>] (do_init_module) from [<80092dd8>] (load_module+0x177c/0x1d4c) [<80092dd8>] (load_module) from [<8009352c>] (SyS_finit_module+0x64/0x74) [<8009352c>] (SyS_finit_module) from [<8000f4c0>] (ret_fast_syscall+0x0/0x3c) Code: e3a03000 e58631f8 e5863228 e8bd80f8 (e7f001f2) ---[ end trace 6f28ec270544e09e ]--- Segmentation fault root@imx6qdlsolo:~# Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>