aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <drzeus@drzeus.cx>2007-01-07 10:59:06 -0500
committerPierre Ossman <drzeus@drzeus.cx>2007-02-04 14:54:11 -0500
commitae06eaf9abb1fd00e413753786e13406eda5819a (patch)
tree9b4a71e649d933734f09ee95d016a4fe143169c6
parent5ba593a97206fb96dc0e63f209e6ade86452844f (diff)
mmc: Graceful fallback for fancy features
MMC high-speed, wide bus support and SD high-speed are functions that aren't critical for correct operation of the card. As such, they shouldn't mark the card as bad or dead when there is a failure activating these features. This is needed in particular on some really stupid hardware (e.g. Winbond's) where not all data transfer commands are supported. Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
-rw-r--r--drivers/mmc/mmc.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index fb04bdd26c36..5046a1661342 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1092,7 +1092,8 @@ static void mmc_process_ext_csds(struct mmc_host *host)
1092 mmc_wait_for_req(host, &mrq); 1092 mmc_wait_for_req(host, &mrq);
1093 1093
1094 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) { 1094 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) {
1095 mmc_card_set_dead(card); 1095 printk("%s: unable to read EXT_CSD, performance "
1096 "might suffer.\n", mmc_hostname(card->host));
1096 continue; 1097 continue;
1097 } 1098 }
1098 1099
@@ -1108,7 +1109,6 @@ static void mmc_process_ext_csds(struct mmc_host *host)
1108 printk("%s: card is mmc v4 but doesn't support " 1109 printk("%s: card is mmc v4 but doesn't support "
1109 "any high-speed modes.\n", 1110 "any high-speed modes.\n",
1110 mmc_hostname(card->host)); 1111 mmc_hostname(card->host));
1111 mmc_card_set_bad(card);
1112 continue; 1112 continue;
1113 } 1113 }
1114 1114
@@ -1289,7 +1289,9 @@ static void mmc_read_switch_caps(struct mmc_host *host)
1289 mmc_wait_for_req(host, &mrq); 1289 mmc_wait_for_req(host, &mrq);
1290 1290
1291 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) { 1291 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) {
1292 mmc_card_set_dead(card); 1292 printk("%s: unable to read switch capabilities, "
1293 "performance might suffer.\n",
1294 mmc_hostname(card->host));
1293 continue; 1295 continue;
1294 } 1296 }
1295 1297
@@ -1321,12 +1323,8 @@ static void mmc_read_switch_caps(struct mmc_host *host)
1321 1323
1322 mmc_wait_for_req(host, &mrq); 1324 mmc_wait_for_req(host, &mrq);
1323 1325
1324 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE) { 1326 if (cmd.error != MMC_ERR_NONE || data.error != MMC_ERR_NONE ||
1325 mmc_card_set_dead(card); 1327 (status[16] & 0xF) != 1) {
1326 continue;
1327 }
1328
1329 if ((status[16] & 0xF) != 1) {
1330 printk(KERN_WARNING "%s: Problem switching card " 1328 printk(KERN_WARNING "%s: Problem switching card "
1331 "into high-speed mode!\n", 1329 "into high-speed mode!\n",
1332 mmc_hostname(host)); 1330 mmc_hostname(host));