diff mbox series

wilc1000: Fix spurious "FW not responding" error

Message ID 20211208062747.3405221-1-davidm@egauge.net (mailing list archive)
State Accepted
Commit 73bbef64bca781bbfa1abe07eb86b733c5b4f7da
Delegated to: Kalle Valo
Headers show
Series wilc1000: Fix spurious "FW not responding" error | expand

Commit Message

David Mosberger-Tang Dec. 8, 2021, 6:27 a.m. UTC
When deinitializing the driver, one or more "FW not responding" error
appears on the console.  This appears to be due to wilc_wlan_stop()
disabling host/WILC1000 communication, but then right afterwards, it
tries to release the bus with chip-sleep enabled.  The problem is
enabling the chip-sleep cannot success once host/WILC1000
communication is disabled.  Fix by only releasing the bus.

Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
---
 drivers/net/wireless/microchip/wilc1000/wlan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo Dec. 14, 2021, 6:45 p.m. UTC | #1
David Mosberger-Tang <davidm@egauge.net> wrote:

> When deinitializing the driver, one or more "FW not responding" error
> appears on the console.  This appears to be due to wilc_wlan_stop()
> disabling host/WILC1000 communication, but then right afterwards, it
> tries to release the bus with chip-sleep enabled.  The problem is
> enabling the chip-sleep cannot success once host/WILC1000
> communication is disabled.  Fix by only releasing the bus.
> 
> Signed-off-by: David Mosberger-Tang <davidm@egauge.net>

Patch applied to wireless-drivers-next.git, thanks.

73bbef64bca7 wilc1000: Fix spurious "FW not responding" error
diff mbox series

Patch

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index f1e4ac3a2ad5..5d7f5b52f6de 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -1224,7 +1224,8 @@  int wilc_wlan_stop(struct wilc *wilc, struct wilc_vif *vif)
 
 	ret = 0;
 release:
-	release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
+	/* host comm is disabled - we can't issue sleep command anymore: */
+	release_bus(wilc, WILC_BUS_RELEASE_ONLY);
 
 	return ret;
 }