linux/drivers/net/wireless
Hui Wang 107b871333 brcmfmac: Remove waitqueue_active check
We met a problem of pm_suspend  when repeated closing/opening the lid
on a Lenovo laptop (1/20 reproduce rate), below is the log:

[ 199.735876] PM: Entering mem sleep
[ 199.750516] e1000e: EEE TX LPI TIMER: 00000011
[ 199.856638] Trying to free nonexistent resource <000000000000d000-000000000000d0ff>
[ 201.753566] brcmfmac: brcmf_pcie_suspend: Timeout on response for entering D3 substate
[ 201.753581] pci_legacy_suspend(): brcmf_pcie_suspend+0x0/0x1f0 [brcmfmac] returns -5
[ 201.753585] dpm_run_callback(): pci_pm_suspend+0x0/0x160 returns -5
[ 201.753589] PM: Device 0000:04:00.0 failed to suspend async: error -5

Through debugging, we found when problem happens, it is not the device
fails to enter D3, but the signal D3_ACK comes too early to pass the
waitqueue_active() check.

Just like this:
brcmf_pcie_send_mb_data(devinfo, BRCMF_H2D_HOST_D3_INFORM);
// signal is triggered here
wait_event_timeout(devinfo->mbdata_resp_wait, devinfo->mbdata_completed,
		   BRCMF_PCIE_MBDATA_TIMEOUT);

So far I think it is safe to remove waitqueue_active check since there
is only one place to trigger this signal (sending
BRCMF_H2D_HOST_D3_INFORM). And it is not a problem calling wake_up
event earlier than calling wait_event.

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Hante Meuleman <meuleman@broadcom.com>
Cc: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Cc: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Cc: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
2016-03-10 14:57:56 +02:00
..
admtek adm80211: move under admtek vendor directory 2015-11-17 19:49:19 +02:00
ath carl9170: import 1.9.9 firmware headers 2016-03-07 14:11:09 +02:00
atmel at76c50x-usb: avoid double usb_put_dev() after downloading internal firmware in at76_probe() 2016-03-07 14:24:06 +02:00
broadcom brcmfmac: Remove waitqueue_active check 2016-03-10 14:57:56 +02:00
cisco wireless: airo: re-use mac_pton() 2015-11-30 14:59:28 +02:00
intel * update GSCAN capabilities (Ayala) 2016-03-10 14:53:35 +02:00
intersil hostap: avoid uninitialized variable use in hfa384x_get_rid 2016-02-06 13:59:24 +02:00
marvell libertas: fix an error code in probe 2016-03-10 14:56:46 +02:00
mediatek mt7601u: do not free dma_buf when ivp allocation fails 2016-03-07 14:39:05 +02:00
ralink rt2x00: add new rt2800usb device Buffalo WLI-UC-G450 2016-03-07 14:27:35 +02:00
realtek rtlwifi: Fix size of wireless mode variable 2016-03-08 12:31:17 +02:00
rsi mac80211: pass block ack session timeout to to driver 2016-01-14 11:13:17 +01:00
st wireless: cw1200: use __maybe_unused to hide pm functions_ 2016-03-08 12:32:52 +02:00
ti Here's another round of updates for -next: 2016-03-01 17:03:27 -05:00
zydas zd1211rw: move under zydas vendor directory 2015-11-18 14:28:30 +02:00
Kconfig mac80211_hwsim: move Kconfig entry for sorting alphabetically 2015-11-18 15:23:36 +02:00
mac80211_hwsim.c mac80211_hwsim: use reset to set mac header 2016-03-04 22:45:13 -05:00
mac80211_hwsim.h
Makefile ath: unify Kconfig with other vendors 2015-11-18 14:28:31 +02:00
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c rndis_wlan: fix checking for default value 2015-09-22 16:14:32 -07:00
wl3501_cs.c
wl3501.h