From: Nicolas Pitre Date: Tue, 28 Apr 2009 02:38:12 +0000 (-0400) Subject: [MMC] give Sandisk/Kingston SDHC cards some slack before the SWITCH command X-Git-Url: http://git.marvell.com/?p=orion.git;a=commitdiff_plain;h=3ea638523747f6d312f11f643a3175c1a4661eec;hp=c0c3df02efed0e5dea9aa4d8313e06e1f68f2cb4 [MMC] give Sandisk/Kingston SDHC cards some slack before the SWITCH command Without this delay, those cards simply won't work in high speed mode as the SWITCH command does not succeeds. Signed-off-by: Nicolas Pitre Tested-by: Martin Michlmayr --- diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index cd81c39..ba4c7ab 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -263,6 +263,15 @@ static int mmc_switch_hs(struct mmc_card *card) return -ENOMEM; } + /* + * Some SDHC cards, notably those with a Sandisk SD controller + * (also found in Kingston products) need a bit of slack + * before successfully handling the SWITCH command. So far, + * cards identifying themselves as "SD04G" and "SD08G" are + * affected + */ + udelay(100); + err = mmc_sd_switch(card, 1, 0, 1, status); if (err) goto out;