Subject: [PATCH 5.12 372/384] rsi: Use resume_noirq for SDIO

From: Greg Kroah-Hartman <[email-masked]>
Date: Mon, 10 May 2021 12:22:41 +0200

From: Marek Vasut <[email-masked]>

commit c434e5e48dc4e626364491455f97e2db0aa137b1 upstream.

The rsi_resume() does access the bus to enable interrupts on the RSI
SDIO WiFi card, however when calling sdio_claim_host() in the resume
path, it is possible the bus is already claimed and sdio_claim_host()
spins indefinitelly. Enable the SDIO card interrupts in resume_noirq
instead to prevent anything else from claiming the SDIO bus first.

Fixes: 20db07332736 ("rsi: sdio suspend and resume support")
Signed-off-by: Marek Vasut <[email-masked]>
Cc: Amitkumar Karwar <[email-masked]>
Cc: Angus Ainslie <[email-masked]>
Cc: David S. Miller <[email-masked]>
Cc: Jakub Kicinski <[email-masked]>
Cc: Kalle Valo <[email-masked]>
Cc: Karun Eagalapati <[email-masked]>
Cc: Martin Kepplinger <[email-masked]>
Cc: Sebastian Krzyszkowiak <[email-masked]>
Cc: Siva Rebbagondla <[email-masked]>
Cc: [email-masked]
Cc: [email-masked]
Signed-off-by: Kalle Valo <[email-masked]>
Link: https://lore.kernel.org/r/[email-masked]
Signed-off-by: Greg Kroah-Hartman <[email-masked]>
---
 drivers/net/wireless/rsi/rsi_91x_sdio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -1513,7 +1513,7 @@ static int rsi_restore(struct device *de
 }
 static const struct dev_pm_ops rsi_pm_ops = {
 	.suspend = rsi_suspend,
-	.resume = rsi_resume,
+	.resume_noirq = rsi_resume,
 	.freeze = rsi_freeze,
 	.thaw = rsi_thaw,
 	.restore = rsi_restore,