give Sandisk/Kingston SDHC cards some slack before the SWITCH

command.

svn path=/dists/sid/linux-2.6/; revision=13525
This commit is contained in:
Martin Michlmayr 2009-04-30 17:08:03 +00:00
parent 83e18dc7a2
commit cc2a9cca51
3 changed files with 37 additions and 0 deletions

2
debian/changelog vendored
View File

@ -11,6 +11,8 @@ linux-2.6 (2.6.29-4) UNRELEASED; urgency=low
- allow for alternative __copy_to_user/__clear_user implementations
- alternative copy_to_user/clear_user implementation copy_user
* [arm/orion5x, armel/kirkwood] Enable UACCESS_WITH_MEMCPY.
* [MMC] give Sandisk/Kingston SDHC cards some slack before the SWITCH
command.
[ dann frazier ]
* [parisc] Fix macro expansion in atomic.h fixing PHONET compilation issue

View File

@ -0,0 +1,34 @@
From: Nicolas Pitre <nico@cam.org>
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
[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 <nico@marvell.com>
Tested-by: Martin Michlmayr <tbm@cyrius.com>
---
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;

View File

@ -7,3 +7,4 @@
+ features/arm/alternative-copy-user.patch
- bugfix/mips/compat-zero-upper-32bits-of-offset_high-and-offset_low.patch
+ bugfix/all/stable/2.6.29.2.patch
+ bugfix/all/mmc-sd-udelay-switch.patch