diff mbox

[5/5] wlcore: sdio: Warn about runtime PM suspend errors

Message ID 20180517185029.71716-6-tony@atomide.com (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show

Commit Message

Tony Lindgren May 17, 2018, 6:50 p.m. UTC
We may get -EBUSY from runtime PM and that most likely means some
earlier wlcore command did not complete yet and further calls may
fail. Let's add a warning to make it easier to track down and fix
such issues in wlcore code.

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

Patch

diff --git a/drivers/net/wireless/ti/wlcore/sdio.c b/drivers/net/wireless/ti/wlcore/sdio.c
--- a/drivers/net/wireless/ti/wlcore/sdio.c
+++ b/drivers/net/wireless/ti/wlcore/sdio.c
@@ -188,6 +188,13 @@  static int wl12xx_sdio_power_off(struct wl12xx_sdio_glue *glue)
 		return error;
 	}
 
+	if (error == -EBUSY) {
+		dev_warn(&card->dev,
+			 "%s: wlcore write did not yet complete?\n",
+			__func__);
+		dump_stack();
+	}
+
 	return 0;
 }