[Letux-kernel] wifi reset bug

Andreas Kemnade andreas at kemnade.info
Mon Feb 8 21:56:32 CET 2016


Hi,

I finally did some logging of the tca reset output for wifi:

root at gta04:~# modprobe libertas_sdio
[  110.558258] libertas_sdio: Libertas SDIO driver
[  110.563110] libertas_sdio: Copyright Pierre Ossman
[  110.568389] driver_register 'libertas_sdio'
[  110.573211] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0
[  110.634613] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 1
root at gta04:~# [  111.153228] libertas_sdio mmc1:0001:1 (unnamed net_device) (uninitialized): 00:19:88:22:18:02, fw 9.70.3p36, cap 0x00000303
[  111.171173] libertas_sdio mmc1:0001:1 (unnamed net_device) (uninitialized): PREP_CMD: command 0x00a3 failed: 2
[  111.192565] libertas_sdio mmc1:0001:1 wlan0: Marvell WLAN 802.11 adapter
[  111.247467] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0

root at gta04:~# ifconfig wlan0 up
[  137.797698] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0
[  137.835479] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 1
[  138.353088] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
root at gta04:~# 
root at gta04:~# 
root at gta04:~# 
root at gta04:~# ifconfig wlan0 down
[  180.743408] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0
<--- should stay at 1 here ** BUG **
root at gta04:~# 


doing suspend:

root at gta04:~# pm-suspendwlan0: WPA: Group rekeying completed with 34:81:c4:b1:7a:17 [GTK=CCMP]

[  260.546936] PM: Syncing filesystems ... done.
[  260.564056] PM: Preparing system for sleep (mem)
wlan0: CTRL-EVENT-DISCONNECTED bssid=34:81:c4:b1:7a:17 reason=3 locally_generated=1
[  260.858856] mmc1: card 0001 removed
[  260.864837] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0
<--- also buggy

[  260.906829] Freezing user space processes ... (elapsed 0.005 seconds) done.
[  260.920227] Freezing remaining freezable tasks ... (elapsed 0.003 seconds) done.
[  260.931915] PM: Suspending system (mem)
[  260.970001] w2sg_set_lna_power: off
[  260.973815] WWAN suspend
[  260.980346] WWAN suspend
[  260.986236] PM: suspend of devices complete after 44.311 msecs
[  261.000396] PM: late suspend of devices complete after 8.026 msecs
[  261.018249] PM: noirq suspend of devices complete after 11.260 msecs
[  261.025177] Disabling non-boot CPUs ...
[  261.029205] Powerdomain (per_pwrdm) didn't enter target state 1
[  261.029205] Powerdomain (core_pwrdm) didn't enter target state 1
[  261.029205] Could not enter target state in pm_suspend
[  261.038330] PM: noirq resume of devices complete after 8.880 msecs
[  261.056152] PM: early resume of devices complete after 9.216 msecs
[  261.066375] WWAN resume
[  261.069396] WWAN resume
[  261.072021] GPS resuming 0 0 1
[  261.107788] w2sg_rfkill_set_block: blocked: 0
[  261.112396] w2sg_set_lna_power: off
[  261.160400] PM: resume of devices complete after 97.686 msecs
[  261.173339] PM: Finishing wakeup.
[  261.176971] Restarting tasks ... done.
[  261.674774] thermal thermal_zone0: failed to read out thermal zone
(-19)
I am missing some action on the reset pin here.

Could not read interface wlan0 flags: No such device
root at gta04:~# cd /sys/bus/platform/drivers/omap_hsmmc/
INIT: cannot execute "/usr/bin/xsrv-start"hsmmc# 
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: cannot execute "/usr/bin/xsrv-start"
INIT: Id "X1" respawning too fast: disabled for 5 minutes
echo 480b4000.mmc >unbind 
root at gta04:/sys/bus/platform/drivers/omap_hsmmc# echo 480b4000.mmc >bind
[  363.859985] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer cd
[  363.866607] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
[  363.873596] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc at 480b4000[0]'
[  363.883453] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc at 480b4000[0]'
[  363.893127] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
[  363.900421] omap_hsmmc 480b4000.mmc: lookup for GPIO cd failed
[  363.906738] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer wp
[  363.913146] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
[  363.920166] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc at 480b4000[0]'
[  363.929962] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc at 480b4000[0]'
[  363.939605] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
[  363.946807] omap_hsmmc 480b4000.mmc: lookup for GPIO wp failed
[  363.954376] platform wifi_pwrseq: GPIO lookup for consumer reset
[  363.960754] platform wifi_pwrseq: using device tree for GPIO lookup
[  363.967712] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/wifi_pwrseq[0]' - status (0)
[  363.978149] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0
[  363.984405] omap_hsmmc 480b4000.mmc: allocated mmc-pwrseq
[  364.005828] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 0
[  364.065612] leds-tca6507 1-0045: tca gpio 0 -> 6 set value: 1
---> now, finally... the required reset!

root at gta04:/sys/bus/platform/drivers/omap_hsmmc# [  364.159942] mmc1: new SDIO card at address 0001
[  364.647644] libertas_sdio mmc1:0001:1 (unnamed net_device) (uninitialized): 00:19:88:22:18:02, fw 9.70.3p36, cap 0x00000303
[  364.667114] libertas_sdio mmc1:0001:1 (unnamed net_device) (uninitialized): PREP_CMD: command 0x00a3 failed: 2
[  364.685211] libertas_sdio mmc1:0001:1 wlan0: Marvell WLAN 802.11 adapter
[  364.763183] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
wlan0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=US

root at gta04:/sys/bus/platform/drivers/omap_hsmmc# wlan0: Trying to associate with 34:81:c4:b1:7a:17 (SSID='homeap2' freq=2437 MHz)
wlan0: Associated with 34:81:c4:b1:7a:17[  365.870849] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

wlan0: WPA: Key negotiation completed with 34:81:c4:b1:7a:17 [PTK=CCMP GTK=CCMP]
wlan0: CTRL-EVENT-CONNECTED - Connection to 34:81:c4:b1:7a:17 completed [id=8 id_str=]
wlan0: CTRL-EVENT-REGDOM-CHANGE init=COUNTRY_IE type=COUNTRY alpha2=DE

root at gta04:/sys/bus/platform/drivers/omap_hsmmc# 
Ok, I think modifying the pwrseq so that it will keep the gpio on 1 will solve many
problems.

Regards,
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20160208/da86eab1/attachment-0001.asc>


More information about the Letux-kernel mailing list