Last active
January 7, 2023 18:30
-
-
Save hadess/6ce1b1c5dc8f5468d9dc to your computer and use it in GitHub Desktop.
Baytrail-T Wi-Fi stability patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From df5bb0eca11e6ab072908b6e0d2e7d9e01d1eb84 Mon Sep 17 00:00:00 2001 | |
From: Dong Aisheng <[email protected]> | |
Date: Wed, 24 Jun 2015 21:28:48 +0200 | |
Subject: [PATCH] mmc: sdhci: get runtime pm when sdio irq is enabled | |
SDIO cards may need clock to send the card interrupt to host. | |
Thus, we get runtime pm when sdio irq is enabled to prevent the clock | |
resource is released and put it when sdio irq is disabled. | |
Signed-off-by: Dong Aisheng <[email protected]> | |
--- | |
drivers/mmc/host/sdhci.c | 6 ++++-- | |
1 file changed, 4 insertions(+), 2 deletions(-) | |
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c | |
index c80287a..f7433fa 100644 | |
--- a/drivers/mmc/host/sdhci.c | |
+++ b/drivers/mmc/host/sdhci.c | |
@@ -1744,7 +1744,8 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) | |
struct sdhci_host *host = mmc_priv(mmc); | |
unsigned long flags; | |
- sdhci_runtime_pm_get(host); | |
+ if (enable) | |
+ sdhci_runtime_pm_get(host); | |
spin_lock_irqsave(&host->lock, flags); | |
if (enable) | |
@@ -1755,7 +1756,8 @@ static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) | |
sdhci_enable_sdio_irq_nolock(host, enable); | |
spin_unlock_irqrestore(&host->lock, flags); | |
- sdhci_runtime_pm_put(host); | |
+ if (!enable) | |
+ sdhci_runtime_pm_put(host); | |
} | |
static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, | |
-- | |
2.4.3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment