mmc: fix detection of memory part of SD-combo card with broken SDIO
authorMichal Miroslaw <mirq-linux@rere.qmqm.pl>
Thu, 2 Dec 2010 22:38:12 +0000 (23:38 +0100)
committerChris Ball <cjb@laptop.org>
Sun, 9 Jan 2011 03:48:37 +0000 (22:48 -0500)
In case of failure, mmc_attach_sdio() will power off the SD bus.
Power it up and reinitialize before trying SD memory detection.

Reported-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/core.c

index 241ffb28351c41689b0d2bbaf639141b3e4740fb..97e0624eb9b60dd3a5dc9e3c87ee62ab723d0bc6 100644 (file)
@@ -1569,6 +1569,11 @@ void mmc_rescan(struct work_struct *work)
                                 * Try SDMEM (but not MMC) even if SDIO
                                 * is broken.
                                 */
+                               mmc_power_up(host);
+                               sdio_reset(host);
+                               mmc_go_idle(host);
+                               mmc_send_if_cond(host, host->ocr_avail);
+
                                if (mmc_send_app_op_cond(host, 0, &ocr))
                                        goto out_fail;