Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit b61e6dd3 authored by Ritesh Harjani's avatar Ritesh Harjani Committed by Sahitya Tummala
Browse files

mmc: CMDQ Error handling context syncronization



This patch adds err_rwsem in mmc_cmdq_context_info,
which is used to synchronize between:
1. Error handler work <--> blk softirqs completion.
2. Error handler work <--> mmc_cmdq_thread issue ctx.

Error handler takes the writer lock and remaining
contexts which can run in parallel needs to rake read
semaphore.

To make sure that we release the read rwsem before
sleeping in case we expect error handler to run and
again check the state of the req. If the req is not
valid we return to the caller otherwise we proceed
to issue this req to controller.

Also note that error handler as of now is doing mmc_put_card
for all the requests pulled for which mmc_get_card is done.
So in case if the request was re-queued by cmdq-err handler,
then corresponding mmc_put_card is also already done.
So after we wake up and acquire the semaphore, we should
simply return to the caller.

Change-Id: Ie29a02cee4e42a0df1bd0fff6c746f112527b433
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
Signed-off-by: default avatarSahitya Tummala <stummala@codeaurora.org>
parent 499b03bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment