SDIO command timeout issue with SD8787 wifi chipset

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SDIO command timeout issue with SD8787 wifi chipset

31,323件の閲覧回数
krishnanp
Contributor III

Platform: sabre-lite imx6 Q board

Kernel: 3.0.35

Wifi chipset: Marvell SD8787 based wifi module

wifi driver : mwifiex

We are facing an issue in Wi-Fi bring-up  on 3.0.35  kernel.  The Wi-Fi module connected to sabre-lite board through SDIO interface.

The driver is able to load the firmware. But if  we try to a data transfer the driver crashes with following message.

root@freescale /$ dhclient mlan0
Internet Systems Consortium DHCP Client V3.0.3b1
Copyright 2004-2005 Internet Systems Consortium.

Listening on Socket/eth0
Sending on   Socket/eth0
Listening on Socket/mlan0
Sending on   Socket/mlan0
Sending on   Socket/fallback
DHCPDISCOVER on mlan0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
DHCPDISCOVER on mlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
mwifiex_sdio mmc1:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id (97.892473) = 0xce, act = 0x1c8c
mwifiex_sdio mmc1:0001:1: num_data_h2c_failure = 0
mwifiex_sdio mmc1:0001:1: num_cmd_h2c_failure = 0
mwifiex_sdio mmc1:0001:1: num_cmd_timeout = 1
mwifiex_sdio mmc1:0001:1: num_tx_timeout = 0
mwifiex_sdio mmc1:0001:1: last_cmd_index = 3
mwifiex_sdio mmc1:0001:1: last_cmd_resp_index = 2
mwifiex_sdio mmc1:0001:1: last_event_index = 4
mwifiex_sdio mmc1:0001:1: data_sent=0 cmd_sent=1
mwifiex_sdio mmc1:0001:1: ps_mode=1 ps_state=0
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on mlan0 to 255.255.255.255 port 67 interval 15
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13

Further looking into the issue,  I have found a patch  for "eSDHC misses SDIO interrupt when CINT is disabled" for imx processors.

https://patchwork.kernel.org/patch/2446091/

Does this patch is applicable to imx6 processors? If yes, do you have a patch for 3.0.35 kernel?

Thanks in advance,

Krishnan.

ラベル(2)
33 返答(返信)

4,551件の閲覧回数
soursunny
Contributor II

/ # mmc1: new high speed SDIO card at address 0001

vendor=0x02DF device=0x9119 class="0" function=1

wlan_sdio_poll_card_status failed, tries = 100, cs = 0xc

WLAN: FW download with helper poll status timeout @ 0

wlan_dnld_fw fail ret=0xffffffff

WLAN: Download FW with nowwait: 0

Firmware Init Failed

woal_add_card failed

wlan_sdio: probe of mmc1:0001:1 failed with error -1

FW download fail?

0 件の賞賛
返信

4,549件の閲覧回数
csl_csl_csl
Contributor I

the question may "wlan_udelay" function error.

0 件の賞賛
返信

4,549件の閲覧回数
raymondwang
Senior Contributor I

I did not encounter this error, How about your wifi sdhc config? Mine is as below:

static const struct esdhc_platform_data mx6q_sd3_data __initconst = {

  .always_present = 1,

  .keep_power_at_suspend = 1,

  .cd_type = ESDHC_CD_PERMANENT,

}; 

//don't set runtime_pm,

0 件の賞賛
返信

4,549件の閲覧回数
soursunny
Contributor II

thx...

but there are some problems too...

E/WifiHW  ( 2641): Cannot open "/system/etc/wifi/wpa_supplicant.conf": No such file or directory

I copy wpa_supplicant.conf which i don't know right or not to it.

and then

D/SoftapController( 2350): Softap fwReload - Ok

D/CommandListener( 2350): Setting iface cfg

D/CommandListener( 2350): Trying to bring down wlan0

D/BluetoothAdapter( 2914): 1095804208: getState() :  mService = null. Returning STATE_OFF

E/WifiHW  ( 2641): ctrl_interface != /data/misc/wifi/sockets

I/wpa_supplicant( 3617): SuccessfADDRCONF(NETDEV_UP): p2p0: link is not ready

ully initialized wpa_supplicant

I/wpa_supplicant( 3617): rfkill: Cannot open RFKILL control device

E/WifiHW  ( 2641): Unable to open connection to supplicant on "/data/system/wpa_supplicant/wlan0": No such file or directory

ADDRCONF(NETDEV_UP): wlan0: link is not ready

I/wpa_supplicant( 3617): rfkill: Cannot open RFKILL control device

E/wpa_supplicant( 3617): Failed to initialize control interface 'wlan0'.

E/wpa_supplicant( 3617): You may have another wpa_supplicant process already running or the file was

E/wpa_supplicant( 3617): left by an unclean termination of wpa_supplicant in which case you will need

E/wpa_supplicant( 3617): to manually remove this file before starting wpa_supplicant again.

how can i solve it ?

4,549件の閲覧回数
raymondwang
Senior Contributor I

This is because you are using unix socket for wpa_supplicant. For android based device,you'd better to use

android socket.

In your wpa_supplicant.conf. Android socket example:

ctrl_interface=wlan0

update_config=1

Unix standard socket example:

ctrl_interface=DIR=/data/system/wpa_supplicant GROUP=wifi

update_config=1


I suggest you use android private socket.

Also you need to change init.rc to use android private socket

mkdir /system/etc/wifi 0770 wifi wifi
chmod 0770 /system/etc/wifi
chmod 0660 /system/etc/wifi/wpa_supplicant.conf
chown wifi wifi /system/etc/wifi/wpa_supplicant.conf
#wpa_supplicant control socket for android wifi.c (android private socket)
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
chmod 0770 /data/misc/wifi
chmod 0660 /data/misc/wifi/wpa_supplicant.conf
chown wifi wifi /data/misc/wifi
chown wifi wifi /data/misc/wifi/wpa_supplicant.conf


service wpa_supplicant /system/bin/wpa_supplicant -dd -Dwext -iwlan0 -c /system/etc/wifi/wpa_supplicant.conf
socket wpa_wlan0 dgram 660 wifi wifi
group system wifi inet
disabled
oneshot


  BTW,it's very important that there should be no path /data/system/wpa_supplicant exist since android wifi will check if

this is unix socket or android socket.

0 件の賞賛
返信

4,561件の閲覧回数
krishnanp
Contributor III

Hello raymond,

These configuration  shall help me in enabling the AP mode after porting the  driver to  3.0.35.

thanks for the details 

0 件の賞賛
返信

4,561件の閲覧回数
brackzhang
Contributor I

Hi Krishnan:

I also need to move Marvell SD8787 to imx6( kernel 3.10.53,android 5.0) ,can you give some suggestion about it ? Thanks. my email: brack_zhang@163.com ,Looking forward your help

0 件の賞賛
返信

4,561件の閲覧回数
varsmolta
Contributor V

Mainline kernel should run on i.mx6. Look here: http://eewiki.net/display/linuxonarm/i.MX6x+SABRE+Lite

You won't get hw acceleration or gstreamer plugins though

0 件の賞賛
返信

4,561件の閲覧回数
krishnanp
Contributor III

Thanks for the  link, let me give a try...

0 件の賞賛
返信

4,561件の閲覧回数
varsmolta
Contributor V

On the sabre-lite which SDIO interface are you using (i.e. the number SDx?) Have you set up the pad configs properly? I know the Nitrogen6x (also from boundary devices) uses SD2: http://boundarydevices.com/differences-sabre-lite-nitrogen6x-and-som/. Perhaps EricNelson can show you how to configure the SD pads correctly on sabre-lite?

0 件の賞賛
返信

4,561件の閲覧回数
krishnanp
Contributor III

I am using SDHC3 interface which is already available in sabre-lite. The wifi module is an evaluation module which is plugged on mmc slot.

The IO pad configuration for SDHC3 looks fine (sdhc mode, 100k pull up, 50Mhz speed).

One more thing I noticed is mlan0  Tx count=0, means no packets are getting transmitted from device. But the Rx packets count shows non zero value.

0 件の賞賛
返信

4,561件の閲覧回数
krishnanp
Contributor III

Thanks for the help...

I have added debug messages in  sdio host controller side driver and  ensured CMD52  and CMD53 are happening without any error messages.

Further debugging to this issue its visible that the driver hangs after a call to assert firmware. We are seeing the same behavior with the other module also.

I have also checked out the latest firmware and tried but issue remains the same.

Any pointers ???

0 件の賞賛
返信

4,561件の閲覧回数
varsmolta
Contributor V

Can you elaborate what you mean by "assert firmware"? Can you pinpoint to a line (function) in the sdio driver where it is hanging?

Also, I believe if you are using the sabre-lite, you need the set_power callback defined: linux-imx6/arch/arm/mach-mx6/board-mx6_nitrogen6x.c at boundary-imx_3.0.35_4.0.0 · boundarydevices/l...

There is a similar issue reported on the wandboard here: [meta-fsl-arm-extra] linux-imx (3.0.35): fix sdhc platform data - Patchwork. Not quite sure if it applies to you

0 件の賞賛
返信