All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sdhci: disable MMC_CAP_NEEDS_POLL in nonremovable case
@ 2010-08-27  6:34 Jaehoon Chung
  2010-08-27  7:09 ` Matt Fleming
  0 siblings, 1 reply; 22+ messages in thread
From: Jaehoon Chung @ 2010-08-27  6:34 UTC (permalink / raw)
  To: linux-mmc; +Cc: Kyungmin Park, matt, Marek Szyprowski

If controller use SDHCI_QUIRK_BROKEN_CARD_DETECTION quirk, 
controller need always polling detect

In this case, always generated interrupt.Because controller checked card status.
I think that is not efficiently.

But if card is nonremovable, we need not always polling.
So i added the check-point which is nonremovable or not

 Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>

---
 drivers/mmc/host/sdhci.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 401527d..4bc5d3c 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1826,8 +1826,9 @@ int sdhci_add_host(struct sdhci_host *host)
 	if (caps & SDHCI_CAN_DO_HISPD)
 		mmc->caps |= MMC_CAP_SD_HIGHSPEED;
 
-	if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
-		mmc->caps |= MMC_CAP_NEEDS_POLL;
+	if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
+		!(host->mmc->caps & MMC_CAP_NONREMOVABLE))
+			mmc->caps |= MMC_CAP_NEEDS_POLL;
 
 	mmc->ocr_avail = 0;
 	if (caps & SDHCI_CAN_VDD_330)
-- 
1.6.0.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2010-09-27  8:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-27  6:34 [PATCH] sdhci: disable MMC_CAP_NEEDS_POLL in nonremovable case Jaehoon Chung
2010-08-27  7:09 ` Matt Fleming
2010-08-27  7:14   ` Kyungmin Park
2010-08-27 11:55     ` Gao, Yunpeng
2010-08-28 13:37       ` Matt Fleming
2010-08-28 13:53         ` [PATCH 1/2] mmc: Add helper function to check if a card is removable Matt Fleming
2010-08-28 13:53           ` [PATCH 2/2] sdhci: disable MMC_CAP_NEEDS_POLL in nonremovable case Matt Fleming
2010-08-30  1:06             ` Kyungmin Park
2010-09-02  8:51             ` Jaehoon Chung
2010-09-02  9:14               ` Matt Fleming
2010-09-08  1:27                 ` Jaehoon Chung
2010-09-15 15:11                   ` Matt Fleming
2010-09-15 15:14                     ` Matt Fleming
2010-09-15 20:38                     ` Chris Ball
2010-09-16  2:20                       ` Chris Ball
2010-09-16  9:02                         ` Matt Fleming
2010-09-26  7:31                           ` zhangfei gao
2010-09-27  8:43                             ` Matt Fleming
2010-08-28 14:13           ` [PATCH 1/2] mmc: Add helper function to check if a card is removable Ben Hutchings
2010-08-28 14:28             ` Matt Fleming
2010-08-30  9:59           ` [PATCH v2] " Matt Fleming
2010-09-02  8:48             ` Jaehoon Chung

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.