diff options
author | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-21 14:08:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:35:22 -0800 |
commit | 311c3c10f6429f4405be6a0e98cb27c6995ca8b9 (patch) | |
tree | 11868cba8c590854b91c28ca99a2c2149989b519 /drivers/mmc/core/sd.c | |
parent | c86935898f7af4bbafa14c0f402a79925c53a33f (diff) | |
download | kernel_samsung_aries-311c3c10f6429f4405be6a0e98cb27c6995ca8b9.zip kernel_samsung_aries-311c3c10f6429f4405be6a0e98cb27c6995ca8b9.tar.gz kernel_samsung_aries-311c3c10f6429f4405be6a0e98cb27c6995ca8b9.tar.bz2 |
mmc: core: Fix hangs related to insert/remove of cards
commit 7f7e4129c23f0419257184dff6fec89d2d5a8964 upstream.
During a rescan operation mmc_attach(sd|mmc|sdio) functions are
called. The error handling in these function can trigger a detach
of the bus, which also meant a power off. This is not notified by
the rescan operation which then continues to the next attach function.
If a power off has been done, the framework must never send any
new commands to the host driver, without first doing a new power up.
This will most likely trigger any host driver to hang.
Moving power off out of detach and instead handle power off
separately when it is actually needed, solves the issue.
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r-- | drivers/mmc/core/sd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index ff27741..bd8805c 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1008,6 +1008,7 @@ static void mmc_sd_detect(struct mmc_host *host) mmc_claim_host(host); mmc_detach_bus(host); + mmc_power_off(host); mmc_release_host(host); } } |