summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2019-09-08 12:12:32 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2019-09-11 16:10:18 +0200
commitc5d3e8fa1a1bf28ac9997421fd18fcbecef941bd (patch)
treeb76c49b729272da870ed625517d5f5e4d51dcc5b /drivers/mmc/core
parentmmc: core: Clarify that the ->ack_sdio_irq() callback is mandatory (diff)
downloadlinux-c5d3e8fa1a1bf28ac9997421fd18fcbecef941bd.tar.xz
linux-c5d3e8fa1a1bf28ac9997421fd18fcbecef941bd.zip
mmc: core: WARN if SDIO IRQs are enabled for non-powered card in suspend
To make sure SDIO func drivers behaves correctly during system suspend/resume, let add a WARN_ON in case the condition is a non-powered SDIO card and there are some SDIO IRQs still being claimed. Tested-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Matthias Kaehlcke <mka@chromium.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r--drivers/mmc/core/sdio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index 8dd8fc32ecca..c557f1519b77 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -951,6 +951,8 @@ static int mmc_sdio_pre_suspend(struct mmc_host *host)
*/
static int mmc_sdio_suspend(struct mmc_host *host)
{
+ WARN_ON(host->sdio_irqs && !mmc_card_keep_power(host));
+
/* Prevent processing of SDIO IRQs in suspended state. */
mmc_card_set_suspended(host->card);
cancel_delayed_work_sync(&host->sdio_irq_work);