linux/drivers/mmc/host
Vaibhav Bedia c4c8eeb4df mmc: omap_hsmmc: Pass on the suspend failure to the PM core
In some cases mmc_suspend_host() is not able to claim the
host and proceed with the suspend process. The core returns
-EBUSY to the host controller driver. Unfortunately, the
host controller driver does not pass on this information
to the PM core and hence the system suspend process continues.

	ret = mmc_suspend_host(host->mmc);
	if (ret) {
		host->suspended = 0;
		if (host->pdata->resume) {
			ret = host->pdata->resume(dev, host->slot_id);

The return status from mmc_suspend_host() is overwritten by return
status from host->pdata->resume. So the original return status is lost.

In these cases the MMC core gets to an unexpected state
during resume and multiple issues related to MMC crop up.
1. Host controller driver starts accessing the device registers
before the clocks are enabled which leads to a prefetch abort.
2. A file copy thread which was launched before suspend gets
stuck due to the host not being reclaimed during resume.

To avoid such problems pass on the -EBUSY status to the PM core
from the host controller driver. With this change, MMC core
suspend might still fail but it does not end up making the
system unusable. Suspend gets aborted and the user can try
suspending the system again.

Signed-off-by: Vaibhav Bedia <vaibhav.bedia@ti.com>
Signed-off-by: Hebbar, Gururaja <gururaja.hebbar@ti.com>
Acked-by: Venkatraman S <svenkatr@ti.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2012-10-03 10:05:23 -04:00
..
at91_mci.c ARM: at91: code removal of CAP9 SoC 2012-02-03 13:33:05 +01:00
at91_mci.h
atmel-mci-regs.h mmc: atmel-mci: AP700x PDC is not connected to MCI 2012-10-03 10:05:23 -04:00
atmel-mci.c mmc: atmel-mci: AP700x PDC is not connected to MCI 2012-10-03 10:05:23 -04:00
au1xmmc.c
bfin_sdh.c mmc: bfin_sdh: Reset SD controller when resume from power saving mode. 2012-09-04 13:58:20 -04:00
cb710-mmc.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
cb710-mmc.h
davinci_mmc.c mmc: davinci_mmc: convert to DMA engine API 2012-09-19 16:29:44 +08:00
dw_mmc-exynos.c mmc: dw_mmc: add support for exynos specific implementation of dw-mshc 2012-10-03 10:05:20 -04:00
dw_mmc-pci.c mmc: dw_mmc: convert copy of struct device in struct dw_mci to a reference 2012-10-03 10:05:13 -04:00
dw_mmc-pltfm.c mmc: dw_mmc: add support for implementation specific callbacks 2012-10-03 10:05:19 -04:00
dw_mmc-pltfm.h mmc: dw_mmc: add support for implementation specific callbacks 2012-10-03 10:05:19 -04:00
dw_mmc.c mmc: dw_mmc: add support for implementation specific callbacks 2012-10-03 10:05:19 -04:00
dw_mmc.h mmc: dw_mmc: add support for implementation specific callbacks 2012-10-03 10:05:19 -04:00
jz4740_mmc.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
Kconfig mmc: dw_mmc: add support for exynos specific implementation of dw-mshc 2012-10-03 10:05:20 -04:00
Makefile mmc: dw_mmc: add support for exynos specific implementation of dw-mshc 2012-10-03 10:05:20 -04:00
mmc_spi.c mmc: mmc_spi: Use module_spi_driver 2012-09-04 13:58:29 -04:00
mmci.c mmc: mmci: use clk_prepare_enable and clk_disable_unprepare 2012-10-03 10:05:21 -04:00
mmci.h ARM: 7280/1: mmc: mmci: Cache MMCICLOCK and MMCIPOWER register 2012-02-02 17:02:15 +00:00
msm_sdcc.c mmc: remove the second argument of k[un]map_atomic() 2012-01-11 23:58:42 -05:00
msm_sdcc.h
mvsdio.c ARM: Orion: fix driver probe error handling with respect to clk 2012-07-25 17:06:21 +02:00
mvsdio.h
mxcmmc.c mmc mxcmmc: do not depend on grouped clocks 2012-04-25 17:03:38 +02:00
mxs-mmc.c mmc: mxs-mmc: fix deadlock caused by recursion loop 2012-09-04 13:58:06 -04:00
of_mmc_spi.c mmc: of_mmc_spi: fix little endian support 2012-02-13 20:38:58 -05:00
omap_hsmmc.c mmc: omap_hsmmc: Pass on the suspend failure to the PM core 2012-10-03 10:05:23 -04:00
omap.c mmc: omap: fix mmc_omap_report_irq to use dev_dbg macros 2012-09-04 13:58:22 -04:00
pxamci.c mmc: pxa-mci: add DT bindings 2012-09-04 13:58:12 -04:00
pxamci.h
s3cmci.c mmc: s3cmci: Convert s3cmci driver to gpiolib API 2012-07-22 15:25:44 -04:00
s3cmci.h
sdhci-cns3xxx.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-dove.c mmc: sdhci-dove: DT support for sdhci-dove 2012-09-04 13:58:15 -04:00
sdhci-esdhc-imx.c mmc: esdhc: Fix DMA_MASK to not break mx25 DMA access 2012-07-22 16:42:30 -04:00
sdhci-esdhc.h mmc: sdhci-esdhc: break out early if clock is 0 2012-09-04 13:58:06 -04:00
sdhci-of-esdhc.c mmc: eSDHC: Add ADMA mode support 2012-09-04 13:58:12 -04:00
sdhci-of-hlwd.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
sdhci-pci-data.c mmc: sdhci-pci: add platform data 2012-01-11 23:58:47 -05:00
sdhci-pci.c mmc: sdhci-pci: Use module_pci_driver 2012-09-04 13:58:29 -04:00
sdhci-pltfm.c mmc: dt: Consolidate DT bindings 2012-05-15 13:29:42 +02:00
sdhci-pltfm.h mmc: sdhci: remove "state" argument from sdhci_suspend_host 2011-12-19 15:50:11 -08:00
sdhci-pxav2.c mmc: sdhci-pxav2, sdhci-pxav3: use clk_prepare/unprepare APIs 2012-09-04 13:58:15 -04:00
sdhci-pxav3.c mmc: sdhci-pxav3: dt: Support "cd-gpios" property 2012-09-19 16:29:12 +08:00
sdhci-s3c.c mmc: sdhci-s3c: Add device tree support 2012-10-03 10:05:20 -04:00
sdhci-spear.c Viresh has moved 2012-06-20 14:39:36 -07:00
sdhci-tegra.c mmc: tegra: convert to device tree support only 2012-09-04 13:58:26 -04:00
sdhci.c mmc: sdhci: Test cd-gpio instead of SDHCI presence when probing 2012-09-19 16:29:45 +08:00
sdhci.h mmc: sdhci: if MAX_CURRENT is 0, try getting current from regulator 2012-07-21 00:02:22 -04:00
sdricoh_cs.c
sh_mmcif.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-07-24 17:12:54 -07:00
sh_mobile_sdhi.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-07-24 17:12:54 -07:00
tifm_sd.c Autogenerated GPG tag for Rusty D1ADB8F1: 15EE 8D6C AB0E 7F0C F999 BFCB D920 0E6C D1AD B8F1 2012-01-14 12:32:16 -08:00
tmio_mmc_dma.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-03-29 15:34:57 -07:00
tmio_mmc_pio.c mmc: tmio: use generic GPIO CD and WP handlers 2012-07-21 00:02:20 -04:00
tmio_mmc.c mmc: convert drivers/mmc/host/* to use module_platform_driver() 2012-01-11 23:58:42 -05:00
tmio_mmc.h mmc: tmio_mmc: remove unused sdio_irq_enabled flag 2012-03-27 12:20:17 -04:00
ushc.c
via-sdmmc.c mmc: via-sdmmc: Use module_pci_driver 2012-09-04 13:58:30 -04:00
vub300.c mmc: vub300: add missing usb_free_urb 2012-09-04 13:58:16 -04:00
wbsd.c
wbsd.h