linux-uconsole/include/linux/mmc
Maxim Levitsky 28e4bf4a8b mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume
commit 4c2ef25fe0 upstream.

If you don't use CONFIG_MMC_UNSAFE_RESUME, as soon as you attempt to
suspend, the card will be removed, therefore this patch doesn't change the
behavior of this option.

However the removal will be done by pm notifier, which runs while
userspace is still not frozen and thus can freely use del_gendisk, without
the risk of deadlock which would happen otherwise.

Card detect workqueue is now disabled while userspace is frozen, Therefore
if you do use CONFIG_MMC_UNSAFE_RESUME, and remove the card during
suspend, the removal will be detected as soon as userspace is unfrozen,
again at the moment it is safe to call del_gendisk.

Tested with and without CONFIG_MMC_UNSAFE_RESUME with suspend and hibernate.

[akpm@linux-foundation.org: clean up function prototype]
[akpm@linux-foundation.org: fix CONFIG_PM-n linkage, small cleanups]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Adjust for 2.6.32]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-05-09 15:55:31 -07:00
..
card.h sdio: add MMC_QUIRK_LENIENT_FN0 2009-09-23 07:39:37 -07:00
core.h mmc: allow host claim / release nesting 2009-09-23 07:39:33 -07:00
host.h mmc: fix all hangs related to mmc/sd card insert/removal during suspend/resume 2011-05-09 15:55:31 -07:00
mmc.h mmc: check status after MMC SWITCH command 2009-09-23 07:39:34 -07:00
sd.h
sdio.h libertas/sdio: 8686: set ECSI bit for 1-bit transfers 2010-08-02 10:21:25 -07:00
sdio_func.h mmc: make SDIO device/driver struct accessors public 2009-09-23 07:39:38 -07:00
sdio_ids.h imwc3200: move iwmc3200 SDIO ids to sdio_ids.h 2009-07-26 19:25:47 -07:00