We need to run the card detect tasklet at the end of slot initialisation as it is possible that a card has been inserted prior to boot, so we miss the insertion interrupt and now the card is sitting there inserted but with no power to it. Signed-off-by: Neil Jones <neil.jones@xxxxxxxxxx> Signed-off-by: Will Newton <will.newton@xxxxxxxxxx> --- drivers/mmc/host/dw_mmc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 2fcc825..0b0bedd 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1441,6 +1441,13 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id) /* Card initially undetected */ slot->last_detect_state = 0; + + /* + * Card may have been plugged in prior to boot so we + * need to run the detect tasklet + */ + tasklet_schedule(&host->card_tasklet); + return 0; } -- 1.7.3.4
From 53094aaa4cd8b5da78acfbf7da6c4848fb720413 Mon Sep 17 00:00:00 2001 From: Will Newton <will.newton@xxxxxxxxxx> Date: Fri, 4 Feb 2011 11:07:46 +0000 Subject: [PATCH 1/2] dw_mmc: Run card detect tasklet during slot initialisation. We need to run the card detect tasklet at the end of slot initialisation as it is possible that a card has been inserted prior to boot, so we miss the insertion interrupt and now the card is sitting there inserted but with no power to it. Signed-off-by: Neil Jones <neil.jones@xxxxxxxxxx> Signed-off-by: Will Newton <will.newton@xxxxxxxxxx> --- drivers/mmc/host/dw_mmc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 2fcc825..0b0bedd 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1441,6 +1441,13 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id) /* Card initially undetected */ slot->last_detect_state = 0; + + /* + * Card may have been plugged in prior to boot so we + * need to run the detect tasklet + */ + tasklet_schedule(&host->card_tasklet); + return 0; } -- 1.7.3.4