On 11/10/2011 3:35 AM, Per Forlin wrote:
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 5278ffb..91d7721 100644
@@ -259,7 +259,7 @@ static void mmc_wait_for_req_done(struct mmc_host *host,
cmd = mrq->cmd;
- if (!cmd->error || !cmd->retries)
+ if (!cmd->error || !cmd->retries || mmc_card_gone(host->card))
host->card will be NULL
static void mmc_remove(struct mmc_host *host)
host->card = NULL;
card is not freed until later.
Please ignore this part. I jumped to conclusions. I had another look
and there can't be any incoming requests when host->card is NULL.
I need to study device_del() further, in order to understand the details.
There can be incoming requests when the host->card is NULL. This happens
when we are detecting the card for the first time. That is, in
mmc_rescan() we send all the initialization commands with host->card
We can do something like this:
#define mmc_card_gone(c) (c && ((c)->state & MMC_STATE_CARD_GONE))
Thanks & Regards,
Sujit Reddy Thumma
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html