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 <t...@atomide.com>
---
 drivers/net/wireless/ti/wlcore/sdio.c | 7 +++++++
 1 file changed, 7 insertions(+)

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;
 }
 
-- 
2.17.0

Reply via email to