[PATCH] mmc: clear all interrupt in suspend before free_irq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From b7be39e0bbac3950057078ac66900ebc0871f77e Mon Sep 17 00:00:00 2001
From: Zhangfei Gao <zhangfei.gao@xxxxxxxxxxx>
Date: Fri, 21 Jan 2011 18:02:47 -0500
Subject: [PATCH] mmc: clear all interrupt in suspend before free_irq

	When debugging wifi host sleep, race condition about
SDHCI_INT_CARD_INT happens.
	Host free_irq in suspend and request_irq when resume back.
	However SDHCI_INT_CARD_INT is not cleared, so interrupt will
immediately happen after request_irq.
	mmc_signal_sdio_irq will be called and wakeup sdio_irq_thread.
	As a result irq_handler in sdio driver is called even before host resume back.

	The correct case is mmc_sdio_resume calls mmc_signal_sdio_irq to
wakeup sdio_irq_thread

Signed-off-by: Zhangfei Gao <zhangfei.gao@xxxxxxxxxxx>
---
 drivers/mmc/host/sdhci.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index aacd78c..97074ae 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1707,6 +1707,7 @@ int sdhci_suspend_host(struct sdhci_host *host,
pm_message_t state)
 	ret = mmc_suspend_host(host->mmc);
 	if (ret)
 		return ret;
+	sdhci_clear_set_irqs(host, SDHCI_INT_ALL_MASK, 0);

 	free_irq(host->irq, host);

-- 
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux