linux-imx/include/linux/mmc
Maxim Levitsky 094b59b2cf 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>
Cc: Lee Jones <lee.jones@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20 13:36:36 -07:00
..
card.h sdio: add quirk to clamp byte mode transfer 2010-03-06 11:26:36 -08: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 2010-09-20 13:36:36 -07:00
mmc.h mmc: fix incorrect interpretation of card type bits 2010-03-24 16:31:21 -07:00
pm.h sdio: introduce API for special power management features 2010-03-06 11:26:36 -08:00
sd.h
sdhci-spear.h sdhci-spear: ST SPEAr based SDHCI controller glue 2010-05-27 09:12:40 -07:00
sdio_func.h sdio: add new function for RAW (Read after Write) operation 2010-05-27 09:12:40 -07:00
sdio_ids.h wimax/iwmc3200: add new sdio device ID to support iwmc3200 2.5GHz sku 2009-10-19 15:55:59 +09:00
sdio.h Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem 2010-04-15 16:21:34 -04:00
sh_mmcif.h sh: add boot code to MMCIF driver header 2010-05-31 13:11:47 +09:00