embeddedTS / meta-ts

2 stars 8 forks source link

WiFI is unstable #1

Closed agherzan closed 8 years ago

agherzan commented 8 years ago

Hello,

Using the current master HEAD of this yocto layer, 3543f3c89d72a85bee65b4da60785fce897acb8c, I get unstable support for the WiFi chipset. After a cold reboot the driver gets probed and WiFi seems fine:

root@ts-imx6:~# dmesg | grep -i wl
[    1.164888] platform wl12xx_vmmc.22: Driver reg-fixed-voltage requests probe deferral
[    3.797041] wl12xx_vmmc: 1800 mV 
[    7.370025] wl1271_sdio mmc0:0001:2: legacy platform data not found, trying device tree
[    8.964025] wlcore: loaded
[   11.252979] wlcore: firmware booted (Rev 6.3.10.0.133)
[   11.277051] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready

After a reboot WiFi module fails with:

root@ts-imx6:~# [   18.465437] mmc0: Timeout waiting for hardware interrupt.
[   18.470907] ------------[ cut here ]------------
[   18.478269] WARNING: at <path>)
[   18.497858] Modules linked in: bluetooth wl12xx wlcore mac80211 cfg80211 rfkill wlcore_sdio
[   18.506437] CPU: 0 PID: 70 Comm: kworker/0:2 Not tainted 3.10.53-1.1.0-technologic+g1cd8768 #1
[   18.515070] Workqueue: events request_firmware_work_func
[   18.523029] [<800138e0>] (unwind_backtrace+0x0/0xdc) from [<80010a88>] (show_stack+0x10/0x14)
[   18.534196] [<80010a88>] (show_stack+0x10/0x14) from [<8002a5dc>] (warn_slowpath_common+0x4c/0)
[   18.544547] [<8002a5dc>] (warn_slowpath_common+0x4c/0x6c) from [<8002a68c>] (warn_slowpath_nul)
[   18.555672] [<8002a68c>] (warn_slowpath_null+0x18/0x20) from [<7f0002c4>] (wl12xx_sdio_raw_wri)
[   18.568156] [<7f0002c4>] (wl12xx_sdio_raw_write+0xe0/0x118 [wlcore_sdio]) from [<7f0a8834>] (w)
[   18.581763] [<7f0a8834>] (wlcore_set_partition+0xe0/0x3c4 [wlcore]) from [<7f09e1d4>] (wl12xx_)
[   18.594766] [<7f09e1d4>] (wl12xx_set_power_on+0x64/0x118 [wlcore]) from [<7f0a42f4>] (wlcore_n)
[   18.607184] [<7f0a42f4>] (wlcore_nvs_cb+0x210/0x8dc [wlcore]) from [<80397768>] (request_firmw)
[   18.619302] [<80397768>] (request_firmware_work_func+0x2c/0x4c) from [<8004001c>] (process_one)
[   18.632956] [<8004001c>] (process_one_work+0x208/0x324) from [<80040f1c>] (worker_thread+0x21c)
[   18.643685] [<80040f1c>] (worker_thread+0x21c/0x340) from [<800459b4>] (kthread+0xa0/0xac)
[   18.653368] [<800459b4>] (kthread+0xa0/0xac) from [<8000d918>] (ret_from_fork+0x14/0x3c)
[   18.662882] ---[ end trace 0735b07b623552e7 ]---
[   18.668893] wl1271_sdio mmc0:0001:2: sdio write failed (-110)
[   18.677927] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[   18.684428] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[   18.694571] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[   18.702944] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[   18.711296] wlcore: ERROR couldn't get hw info

There is no WiFi interface anymore (due to failing driver probe) and this behavior persists for the next reboots too until a new cold reboot.

I saw some things that might help:

  1. Uboot reports "FPGA_DONE never asserted" after every ice40
  2. many gpio errors in dmesg:
root@ts-imx6:~# dmesg | grep -i error
[    1.239839] imx6q-pcie: probe of 1ffc000.pcie failed with error -22
[    3.727439] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[    3.733938] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[    3.740670] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[    3.747211] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[    3.753897] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[    3.760425] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[    8.175847] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[    8.182347] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[    8.193244] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[    8.202034] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[   18.660243] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[   18.668611] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[   18.675287] ts4900gpio 0-0028: gpio_ts4900_read: read error, ret=-5
[   18.685189] ts4900gpio 0-0028: gpio_ts4900_write: write error, ret=-5
[   18.693459] wlcore: ERROR couldn't get hw info

Was the wifi tested? If yes, can you tell me how? Digging into code I see that wlcore_sdio loads wl12xx based on SDIO_SDIO_REV_3_00. So the kernel support seems fine or at least there. I don't exclude a HW issue as well, can you guys confirm me that everything works fine for you?

Thinking that this might be already fixed in current linux-3.10.17-imx6 HEAD, I tested 1cd8768fc5c66977a7169c815d68ab7e49bef518 but sadly no luck.

Thanks in advance, Andrei

markfeathers commented 8 years ago
  1. Uboot reports "FPGA_DONE never asserted" after every ice40

What is in /boot/ts4900-fpga.bin? What is the md5sum?

If the FPGA isn't loading then Linux cannot talk to it over I2C (the read/write -5 errors), so it cannot set WL_EN to take the wifi out reset. What carrier board are you on?

agherzan commented 8 years ago

Hello Mark,

53532abbf7e5b3cc527664be57484c3b ts4900-fpga.bin

I know that there must be something related with the WL_EN but how do you explain that at first boot it works?

Andrei

markfeathers commented 8 years ago

What carrier board are you on?

If the FPGA is never sane then it won't be able to toggle WL_EN. It will work once between power cycles. If you bring down the interface, switch to monitor/master, or reboot to bring it back up it will fail.

I'm not sure where that file came from, but I don't see it matching the checksum of the releases or what is in yocto. Try this file instead: https://github.com/embeddedarm/meta-ts/blob/fido/recipes-extras/ts4900-fpga/ts4900-fpga.bin

agherzan commented 8 years ago

Thank you @markfeathers for your insight. The source of the issue was indeed the FPGA binary bitstream. It was corrupted and flashing it was never successful. I confirm that now everything seems fine.

Thank you, Andrei.