diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-13 14:50:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-11-13 14:50:28 -0500 |
commit | 0579e303553655245e8a6616bd8b4428b07d63a2 (patch) | |
tree | 27471f7bb31e719a97816f329d1357f8b0a3e488 | |
parent | 0f66c08e9611b9a63f2f2fd5af0d12e486c4a02e (diff) | |
parent | 63ef731aa6a81e286de78dcc92241d123424ed39 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
MMC: Do not set unsupported bits in OCR response
MMC: Poll card status after rescanning cards
-rw-r--r-- | drivers/mmc/mmc.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index ee8863c123e3..766bc54406e5 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -475,7 +475,7 @@ static u32 mmc_select_voltage(struct mmc_host *host, u32 ocr) | |||
475 | if (bit) { | 475 | if (bit) { |
476 | bit -= 1; | 476 | bit -= 1; |
477 | 477 | ||
478 | ocr = 3 << bit; | 478 | ocr &= 3 << bit; |
479 | 479 | ||
480 | host->ios.vdd = bit; | 480 | host->ios.vdd = bit; |
481 | mmc_set_ios(host); | 481 | mmc_set_ios(host); |
@@ -1178,14 +1178,29 @@ static void mmc_rescan(void *data) | |||
1178 | { | 1178 | { |
1179 | struct mmc_host *host = data; | 1179 | struct mmc_host *host = data; |
1180 | struct list_head *l, *n; | 1180 | struct list_head *l, *n; |
1181 | unsigned char power_mode; | ||
1181 | 1182 | ||
1182 | mmc_claim_host(host); | 1183 | mmc_claim_host(host); |
1183 | 1184 | ||
1184 | if (host->ios.power_mode == MMC_POWER_ON) | 1185 | /* |
1186 | * Check for removed cards and newly inserted ones. We check for | ||
1187 | * removed cards first so we can intelligently re-select the VDD. | ||
1188 | */ | ||
1189 | power_mode = host->ios.power_mode; | ||
1190 | if (power_mode == MMC_POWER_ON) | ||
1185 | mmc_check_cards(host); | 1191 | mmc_check_cards(host); |
1186 | 1192 | ||
1187 | mmc_setup(host); | 1193 | mmc_setup(host); |
1188 | 1194 | ||
1195 | /* | ||
1196 | * Some broken cards process CMD1 even in stand-by state. There is | ||
1197 | * no reply, but an ILLEGAL_COMMAND error is cached and returned | ||
1198 | * after next command. We poll for card status here to clear any | ||
1199 | * possibly pending error. | ||
1200 | */ | ||
1201 | if (power_mode == MMC_POWER_ON) | ||
1202 | mmc_check_cards(host); | ||
1203 | |||
1189 | if (!list_empty(&host->cards)) { | 1204 | if (!list_empty(&host->cards)) { |
1190 | /* | 1205 | /* |
1191 | * (Re-)calculate the fastest clock rate which the | 1206 | * (Re-)calculate the fastest clock rate which the |