diff options
| author | Asutosh Das <asutoshd@codeaurora.org> | 2015-06-22 11:09:00 +0530 |
|---|---|---|
| committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-31 15:27:01 -0700 |
| commit | 8984d4abf606e738fc0d749159abfc5cfb75e89b (patch) | |
| tree | c090a7e59be088894caf6139815c0b7fc11d42f2 /include/linux | |
| parent | 982df7cff45688d1a2415122bbfa310f3ded4412 (diff) | |
mmc: queue: fix race in mmc shutdown
The shutdown handler waits for in-flight requests only.
It stops the block queue, but doesn't issue the already
queued requests to the LLD. Furthermore, a request which
is in the process of being queued will timeout eventually
because CQE would be halted by shutdown handler.
mmc_cmdq_thread(mct) -> pulls request (r1)
shutdown invoked
stops block queue
halts cqe
(mct) -> issues r1 to LLD
- pulls already issued requests
- CQE halted -> requeues request
- issued request (r1) times out
Hence, in shutdown handler
- stop the block layer queue
- set a state indicating shutdown
- wake up mmc_cmdqd
- mmc_cmdqd:
- pull requests and issue to LLD
- complete the issuing of already queued requests
- wake up shutdown handler
- wait for completion from mmc_cmdqd
- wait for all issued request to complete
- proceed with shutdown
Change-Id: I30a9664d8ba2f4b4f580c2cf71c5d01b735c9491
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
