diff mbox

[1/8] wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()

Message ID 20180619094342.81831-2-tony@atomide.com (mailing list archive)
State Accepted
Commit 4ec7cece87b3ed21ffcd407c62fb2f151a366bc1
Delegated to: Kalle Valo
Headers show

Commit Message

Tony Lindgren June 19, 2018, 9:43 a.m. UTC
Otherwise we can get:

WARNING: CPU: 0 PID: 55 at drivers/net/wireless/ti/wlcore/io.h:84

I've only seen this few times with the runtime PM patches enabled
so this one is probably not needed before that. This seems to
work currently based on the current PM implementation timer. Let's
apply this separately though in case others are hitting this issue.

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 drivers/net/wireless/ti/wlcore/cmd.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Kalle Valo June 27, 2018, 3:46 p.m. UTC | #1
Tony Lindgren <tony@atomide.com> wrote:

> Otherwise we can get:
> 
> WARNING: CPU: 0 PID: 55 at drivers/net/wireless/ti/wlcore/io.h:84
> 
> I've only seen this few times with the runtime PM patches enabled
> so this one is probably not needed before that. This seems to
> work currently based on the current PM implementation timer. Let's
> apply this separately though in case others are hitting this issue.
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>

8 patches applied to wireless-drivers-next.git, thanks.

4ec7cece87b3 wlcore: Add missing PM call for wlcore_cmd_wait_for_event_or_timeout()
02edf81362fe wlcore: Make sure PM calls are paired
fa2648a34e73 wlcore: Add support for runtime PM
3ebbabea4219 wlcore: Fix misplaced PM call for scan_complete_work()
db68052bdf58 wlcore: Fix timout errors after recovery
45aa7f071b06 wlcore: Use generic runtime pm calls for wowlan elp configuration
c40aad28a3cf wlcore: Make sure firmware is initialized in wl1271_op_add_interface()
9b71578de087 wlcore: Enable runtime PM autosuspend support
diff mbox

Patch

diff --git a/drivers/net/wireless/ti/wlcore/cmd.c b/drivers/net/wireless/ti/wlcore/cmd.c
--- a/drivers/net/wireless/ti/wlcore/cmd.c
+++ b/drivers/net/wireless/ti/wlcore/cmd.c
@@ -35,6 +35,7 @@ 
 #include "wl12xx_80211.h"
 #include "cmd.h"
 #include "event.h"
+#include "ps.h"
 #include "tx.h"
 #include "hw_ops.h"
 
@@ -191,6 +192,10 @@  int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
 
 	timeout_time = jiffies + msecs_to_jiffies(WL1271_EVENT_TIMEOUT);
 
+	ret = wl1271_ps_elp_wakeup(wl);
+	if (ret < 0)
+		return ret;
+
 	do {
 		if (time_after(jiffies, timeout_time)) {
 			wl1271_debug(DEBUG_CMD, "timeout waiting for event %d",
@@ -222,6 +227,7 @@  int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
 	} while (!event);
 
 out:
+	wl1271_ps_elp_sleep(wl);
 	kfree(events_vector);
 	return ret;
 }