All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SDHCI: Modify checks to determine the presense of card.
@ 2010-03-05  6:59 Thomas Abraham
  2010-08-27 19:35 ` Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Abraham @ 2010-03-05  6:59 UTC (permalink / raw)
  To: linux-mmc; +Cc: ben-linux, linux-samsung-soc, Thomas Abraham

In the sdhci_request function, the card is determined to be present based
on the SDCD pin status. SDHCI host controllers that do not use SDCD pin
but rely on other mechanism such as external pin interrupts, update the
host flags with SDHCI_DEVICE_DEAD flag based on the card insertion status.
This patch modifies the sdhci_request function such that the it uses
both the SDCD status and SDHCI_DEVICE_DEAD host flag to determine if the
card is inserted or not.

Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
---
 drivers/mmc/host/sdhci.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c279fbc..f1a6ebe 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1106,7 +1106,7 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq)
 		present = sdhci_readl(host, SDHCI_PRESENT_STATE) &
 				SDHCI_CARD_PRESENT;
 
-	if (!present || host->flags & SDHCI_DEVICE_DEAD) {
+	if (!present && host->flags & SDHCI_DEVICE_DEAD) {
 		host->mrq->cmd->error = -ENOMEDIUM;
 		tasklet_schedule(&host->finish_tasklet);
 	} else
-- 
1.6.6.rc2


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

end of thread, other threads:[~2010-08-27 19:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05  6:59 [PATCH] SDHCI: Modify checks to determine the presense of card Thomas Abraham
2010-08-27 19:35 ` Chris Ball

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.