summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorSujith Reddy Thumma <sthumma@codeaurora.org>2011-02-17 21:37:48 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-31 15:20:51 -0700
commit6b2e9c4ce0645fee95ba0aa24d7875706d9cfd04 (patch)
tree84a416fdda7806929e797778765e2423f45758d5 /include/linux/mmc
parent636cddbaa907ee1f37bf03e642ae4086e819c564 (diff)
mmc: core: Fix race between runtime PM suspend and block requests
There is a possible race with mmc_claim_host() in mmc_sd_suspend()/ mmc_suspend() and mmc_claim_host() in mmc_blk_issue_rq() when runtime pm is enabled. Fix this by blocking processing of requests until the previous runtime suspend is processed and then resume as part of msmsdcc_enable(). Previous fix has card detection failure as a side effect during resume. Change-Id: I9cb31269638d9db4e630eb22b973a5335af1bda4 Signed-off-by: Sujith Reddy Thumma <sthumma@codeaurora.org> [sboyd: Dropped msm driver change] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> [subhashj@codeaurora.org: fixed trivial merge conflict] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index e173a6e3462e..01ae900ef4bf 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -357,6 +357,7 @@ struct mmc_host {
wait_queue_head_t wq;
struct task_struct *claimer; /* task that has host claimed */
+ struct task_struct *suspend_task;
int claim_cnt; /* "claim" nesting count */
struct delayed_work detect;