kernel v4.14 FMAC suspend/resume issue on i.MX (i.MX7D and i.MX6 series)

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
FuDu_2380051
Level 1
Level 1

NXP i.MX (i.MX7D/i.MX6 serious) kernel v4.14 release test cycle found one serious issue:  bcm4339 (Murata TypeZP) suspend/resume cannot work well with FMAC driver, wifi doesn’t work after resume back, fmac print out below error information.

V4.14 environment:

Firmware/kernel patches from: https://community.cypress.com/docs/DOC-15330: cypress-fmac-v4.14.34-2018_0716.zip

The issue is very easy to reproduce. Please help to fix the issue !

Issue log: It seem FMAC driver resume back, wifi doesn’t work for long time.

Freezing user space processes ... (elapsed 0.001 seconds) done.

OOM killer disabled.

Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.

Suspending console(s) (use no_console_suspend to debug)

PM: suspend devices took 0.650 seconds

Disabling non-boot CPUs ...

Turn off Mega/Fast mix in DSM

Enabling non-boot CPUs ...

CPU1 is up

imx-sdma 30bd0000.sdma: loaded firmware 4.2

PM: resume devices took 0.040 seconds

OOM killer enabled.

PM: suspend exit

root@imx7dsabresd:~# [  5] 227.49-228.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 228.00-229.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 229.00-230.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 230.00-231.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 231.00-232.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 232.00-233.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 233.00-234.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 234.00-235.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 235.00-236.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 236.00-237.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 237.00-238.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 238.00-239.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 239.00-240.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 240.00-241.00 sec  0.00 Bytes  0.00 bits/sec

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

brcmfmac: brcmf_cfg80211_scan: scan error (-16)

How to reproduce:

PC: iperf3 -c board_IP -t 10000

Board:

iperf3 -s &

i=0;while [ 1 ];do echo +2 > /sys/class/rtc/rtc0/wakealarm;echo mem > /sys/power/state ;sleep 10;i=`expr $i + 1`;echo "========suspend $i times======="; done

0 Likes
1 Solution

We are looking into that issue internally. Will post the patch once the fix is found.

Regards,

Vinayak

View solution in original post

7 Replies
VinayakS_26
Moderator
Moderator
Moderator
100 replies posted 50 replies posted 25 replies posted

Hi,

I couldn't replicate this issue with my setup on a IMX6ulevk with Type 1Zp. Is it possible to share the nvram.txt that you used while setting up the device. Are you using it from here cyw-fmac-nvram/brcmfmac4339-sdio.ZP.txt at master · murata-wireless/cyw-fmac-nvram · GitHub

Regards,

Vinayak

hi Vnak,

Please use wpa_supplicant to connect wpa/wpa2/.. secure AP on i.MX7d sdb/i.MX6SX sdb boards,  it is very easy to reproduce the wlan link up issue.

After system resume, wlan link up is very very late, and "iw dev wlan0 link" show no connected, then iperf show zero data bandwidth.

[  5] 228.00-229.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 229.00-230.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 230.00-231.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 231.00-232.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 232.00-233.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 233.00-234.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 234.00-235.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 235.00-236.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 236.00-237.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 237.00-238.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 238.00-239.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 239.00-240.00 sec  0.00 Bytes  0.00 bits/sec

[  5] 240.00-241.00 sec  0.00 Bytes  0.00 bits/sec

Regards,

Andy

0 Likes

Adding jameel.kareem_2628916​ and skerr_1713761​ from the Murata Linux Applications Team.

0 Likes

I tried this on 4.1.15_2.0.0. with the firmware in  Cypress Linux WiFi Driver Release (FMAC) [2018-02-05]  release.

It might be that the sdio bus drivers might not have come out of suspend.  Could be please attach a dmesg to know more details.

Regards,

Vinayak

lock attach
Attachments are accessible only for community members.

As suspected, it was an sdio issue for which the patch is attached below.

The patch is for the following errors:

brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block write failed -84

brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame

The patch just for CMD53 sg write error issue fix.

There also have wlan cannot link up issue after resume back.

0 Likes

We are looking into that issue internally. Will post the patch once the fix is found.

Regards,

Vinayak