diff options
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r-- | drivers/mmc/core/core.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 569e94da844c..b69ce91b11e1 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -1099,8 +1099,15 @@ void mmc_rescan(struct work_struct *work) | |||
1099 | */ | 1099 | */ |
1100 | err = mmc_send_io_op_cond(host, 0, &ocr); | 1100 | err = mmc_send_io_op_cond(host, 0, &ocr); |
1101 | if (!err) { | 1101 | if (!err) { |
1102 | if (mmc_attach_sdio(host, ocr)) | 1102 | if (mmc_attach_sdio(host, ocr)) { |
1103 | mmc_power_off(host); | 1103 | mmc_claim_host(host); |
1104 | /* try SDMEM (but not MMC) even if SDIO is broken */ | ||
1105 | if (mmc_send_app_op_cond(host, 0, &ocr)) | ||
1106 | goto out_fail; | ||
1107 | |||
1108 | if (mmc_attach_sd(host, ocr)) | ||
1109 | mmc_power_off(host); | ||
1110 | } | ||
1104 | goto out; | 1111 | goto out; |
1105 | } | 1112 | } |
1106 | 1113 | ||
@@ -1124,6 +1131,7 @@ void mmc_rescan(struct work_struct *work) | |||
1124 | goto out; | 1131 | goto out; |
1125 | } | 1132 | } |
1126 | 1133 | ||
1134 | out_fail: | ||
1127 | mmc_release_host(host); | 1135 | mmc_release_host(host); |
1128 | mmc_power_off(host); | 1136 | mmc_power_off(host); |
1129 | 1137 | ||