kernel版本 4.9
问题描述:wifi模块使用AP6212现在已经移植完成,已经可以连接上热点,但是ping 链接到wifi 的设备时,会出现以下错误
root@am335x-lte:/# [ 83.521203] omap_hsmmc 47810000.mmc: MMC start dma failure
[ 83.526744] sdioh_request_packet_chain:CMD53 write failed with code -22
[ 83.533427] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate frame.
[ 116.003300] omap_hsmmc 47810000.mmc: MMC start dma failure
[ 116.008845] sdioh_request_packet_chain:CMD53 write failed with code -22
[ 116.015564] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate frame.
[ 181.107372] omap_hsmmc 47810000.mmc: MMC start dma failure
[ 181.113052] sdioh_request_packet_chain:CMD53 write failed with code -22
[ 181.119701] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate frame.
[ 183.206356] omap_hsmmc 47810000.mmc: MMC start dma failure
[ 183.212085] sdioh_request_packet_chain:CMD53 write failed with code -22
[ 183.218749] dhd_bcmsdh_send_buf: sdio error -1, abort command and terminate frame.
附上wifi启动log如下:
insmod bcmdhd.ko
[ 42.532239] dhd_module_init: in Dongle Host Driver, version 1.579.77.41.7 (r)
[ 42.539447] ======== dhd_wlan_init_plat_data ========
[ 42.597206] dhd_wlan_init_gpio: WL_REG_ON=45, WL_HOST_WAKE=44
[ 42.617927] dhd_wlan_init_gpio: oob_irq=72, oob_irq_flags=0x414
[ 42.632746] dhd_wifi_platform_load: Enter
[ 42.636856] Power-up adapter 'DHD generic adapter'
[ 42.660667] wifi_platform_set_power = 1
[ 42.674581] ======== PULL WL_REG_ON(45) HIGH! ========
[ 43.010967] wifi_platform_bus_enumerate device present 1
[ 43.016349] cp3 invoke mmc_rescan
[ 43.019677] in cp3_force_detect fun
[ 43.029693] ======== Card detection to detect SDIO card! ========
[ 43.221235] mmc2: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 43.315725] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 43.333251] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 43.352341] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 43.370700] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 43.390900] mmc2: queuing unknown CIS tuple 0x81 (9 bytes)
[ 43.534942] mmc2: new high speed SDIO card at address 0001
[ 43.577674] bcmsdh_register: register client driver
[ 43.621246] bcmsdh_sdmmc_probe: Enter num=1
[ 43.650941] bcmsdh_sdmmc_probe: Enter num=2
[ 43.655172] bus num (host idx)=2, slot num (rca)=1
[ 43.659983] found adapter info 'DHD generic adapter'
[ 43.701429] sdioh_attach: set sd_f2_blocksize 256
[ 43.714922] sdioh_attach: sd clock rate = 0
[ 43.761711] dhdsdio_probe : no mutex held. set lock
[ 43.771241] F1 signature read @0x18000000=0x1532a9a6
[ 43.818416] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x2 pkg:0x3
[ 43.845585] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 43.891482] dhd_conf_set_chiprev: chip=0xa9a6, chiprev=2
[ 43.897122] CFG80211-ERROR) wl_setup_wiphy : [ 43.920977] Registering Vendor80211
[ 43.936095] CFG80211-ERROR) wl_init_prof : [ 43.940154] wl_init_prof: No profile
[ 43.965271] dhd_attach(): thread:dhd_watchdog_thread:3bb started
[ 43.991158] dhd_attach(): thread:dhd_dpc:3bc started
[ 44.001080] dhd_attach(): thread:dhd_rxf:3bd started
[ 44.006094] dhd_deferred_work_init: work queue initialized
[ 44.039454] dhd_bus_set_default_min_res_mask: Unhandled chip id
[ 44.077297] sdioh_cis_read: func_cis_ptr[0]=0x1070
[ 44.154623] Dongle Host Driver, version 1.579.77.41.7 (r)
[ 44.184642] wl_ext_iapsta_attach_netdev: bssidx=0
[ 44.189396] Register interface [wlan0] MAC: 6c:21:a2:2c:3f:e1
[ 44.189396]
[ 44.220407] dhd_wl_ioctl: returning as busstate=0
[ 44.261001] dhd_bus_devreset: == Power OFF ==
[ 44.266141] bcmsdh_oob_intr_unregister: Enter
[ 44.270518] bcmsdh_oob_intr_unregister: irq is not registered
[ 44.304641] dhd_txglom_enable: enable 0
[ 44.308541] dhd_conf_set_txglom_params: txglom_mode=multi-desc, use_rxchain=0
[ 44.340414] dhd_conf_set_txglom_params: txglomsize=0, deferred_tx_len=0
[ 44.370621] dhd_open: WLAN driver is not initialized
[ 44.379220] dhd_conf_set_txglom_params: tx_in_rx=1, txinrx_thres=-1, dhd_txminmax=1
[ 44.410828] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=300
[ 44.417761] dhd_bus_devreset: WLAN OFF DONE
[ 44.431008] wifi_platform_set_power = 0
[ 44.434868] ======== PULL WL_REG_ON(45) LOW! ========
[ 44.439941] dhdsdio_probe : the lock is released.
[ 44.462816] dhd_module_init: Exit err=0
root@am335x-lte:/# ifconfig wlan0 up
[ 48.164929] dhd_open: Enter ca3b4800
[ 48.168553] dhd_open : no mutex held. set lock
[ 48.177052]
[ 48.177052] Dongle Host Driver, version 1.579.77.41.7 (r)
[ 48.187041] wl_ext_iapsta_attach_netdev: bssidx=0
[ 48.193729] wl_android_wifi_on in 1
[ 48.197249] wl_android_wifi_on in 2: g_wifi_on=0
[ 48.205152] wifi_platform_set_power = 1
[ 48.209021] ======== PULL WL_REG_ON(45) HIGH! ========
[ 48.532010] sdioh_start: set sd_f2_blocksize 256
[ 48.552273]
[ 48.552273]
[ 48.552273] dhd_bus_devreset: == WLAN ON ==
[ 48.581428] F1 signature read @0x18000000=0x1532a9a6
[ 48.617666] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x2 pkg:0x3
[ 48.644382] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 48.661255] dhd_bus_set_default_min_res_mask: Unhandled chip id
[ 48.684618] dhd_conf_read_config: Ignore config file /system/etc/firmware/config.txt
[ 48.700843] Final fw_path=/system/etc/firmware/fw_bcm43436b0_apsta.bin
[ 48.707414] Final nv_path=/system/etc/firmware/nvram.txt
[ 48.730777] Final clm_path=/system/etc/firmware/clm.blob
[ 48.736124] Final conf_path=/system/etc/firmware/config.txt
[ 48.753773] dhd_os_open_image: /system/etc/firmware/fw_bcm43436b0_apsta.bin (421001 bytes) open success
[ 48.839731] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 48.858398] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 48.875543] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 48.891773] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 48.908825] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 48.923051] dhd_os_open_image: /system/etc/firmware/nvram.txt (1165 bytes) open success
[ 48.931756] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 48.960828] NVRAM version: AP6236_NVRAM_V1.0_20170117
[ 48.967398] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[ 49.048059] systemd-journald[124]: /dev/kmsg buffer overrun, some messages lost.
[ 49.067313] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[ 49.067872] bcmsdh_oob_intr_register: HW_OOB irq=72 flags=0x4
[ 49.076904] Disable tdls_auto_op failed. -1
[ 49.076909] dhd_preinit_ioctls: Set tcpack_sup_mode 0
[ 49.076916] dhd_tcpack_suppress_set 362: already set to 0
[ 49.083319] dhd_apply_default_clm: Ignore clm file /system/etc/firmware/clm.blob
[ 49.088143] Firmware up: op_mode=0x0002, MAC=6c:21:a2:2c:3f:e1
[ 49.100336] dhd_preinit_ioctls Set scancache failed -23
[ 49.109232] Driver: 1.579.77.41.7 (r)
[ 49.109232] Firmware: wl0: Nov 8 2016 18:25:41 version 9.11.3 (r630602) FWID 01-c7935726
[ 49.109232] CLM: 8.1.0
root@am335x-lte:/# ifconfig
wlan0 Link encap:Ethernet HWaddr 6C:21:A2:2C:3F:E1
inet6 addr: fe80::6e21:a2ff:fe2c:3fe1%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1952 (1.9 KiB)
求大佬们指点原因
Shine:
请参考一下下面的帖子看一下是不是 DMA alignment的问题引起的。
e2e.ti.com/…/541016