]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mmc: core: Fix hangs related to insert/remove of cards
authorUlf Hansson <ulf.hansson@stericsson.com>
Wed, 21 Sep 2011 18:08:13 +0000 (14:08 -0400)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:45 +0000 (11:17 -0800)
commit42cb1504d1a19a69d124ff1f2141a6c9eb3f97d2
treeeb5c002c05bc1f1154a41905ddcef0d38a9046af
parent20f637dfa0fdb3b2c94a72759253a701885f1538
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>
drivers/mmc/core/core.c
drivers/mmc/core/core.h
drivers/mmc/core/mmc.c
drivers/mmc/core/sd.c
drivers/mmc/core/sdio.c