diff options
author | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-09-21 14:08:13 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-10-26 16:32:01 -0400 |
commit | 7f7e4129c23f0419257184dff6fec89d2d5a8964 (patch) | |
tree | 3840efd33b32d364451e9f52c575b857efbc771c /drivers/mmc/core/core.h | |
parent | 46cbd56ad4a686c52eeab427faf7e28415bbf28f (diff) | |
download | talos-obmc-linux-7f7e4129c23f0419257184dff6fec89d2d5a8964.tar.gz talos-obmc-linux-7f7e4129c23f0419257184dff6fec89d2d5a8964.zip |
mmc: core: Fix hangs related to insert/remove of cards
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>
Cc: <stable@kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/core.h')
-rw-r--r-- | drivers/mmc/core/core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index d9411ed2a39b..14664f1fb16f 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -43,6 +43,7 @@ int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage, bool cmd11); void mmc_set_timing(struct mmc_host *host, unsigned int timing); void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type); +void mmc_power_off(struct mmc_host *host); static inline void mmc_delay(unsigned int ms) { |