mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 02:21:16 +00:00
mmc: block: fix race in deferred resume
The actual resume takes place when a request is received. In a situation when mmcqd and qseecomd(rpmb) both try to resume the device, a race is ensued. This is because mmcqd first resumes the device and then claims the host. Ideally, if resume is in progress in one context the resume in the other context should be cancelled. Claim the host before resuming the device in mmcqd context. CRs-fixed: 697018 Change-Id: I11d33e642a9b2022f77277196de128c9ac78d334 Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
This commit is contained in:
parent
0af4da69e9
commit
33ab6ff829
1 changed files with 2 additions and 2 deletions
|
@ -2772,12 +2772,12 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
|
|||
|
||||
if (req && !mq->mqrq_prev->req) {
|
||||
mmc_rpm_hold(host, &card->dev);
|
||||
/* claim host only for the first request */
|
||||
mmc_claim_host(card->host);
|
||||
#ifdef CONFIG_MMC_BLOCK_DEFERRED_RESUME
|
||||
if (mmc_bus_needs_resume(card->host))
|
||||
mmc_resume_bus(card->host);
|
||||
#endif
|
||||
/* claim host only for the first request */
|
||||
mmc_claim_host(card->host);
|
||||
if (card->ext_csd.bkops_en)
|
||||
mmc_stop_bkops(card);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue