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

Skip to content
Commit ed238c49 authored by Konstantin Dorfman's avatar Konstantin Dorfman Committed by Stephen Boyd
Browse files

mmc: core: hpi in TRAN state error handling



There could be a race condition in the stop transmission request.
1. Urgent read request comes in.
2. Stop the ongoing write request by calling stop_request MMC host op.
3. Send the stop command (CMD12) to move the card from the receive state
   to programming state.
4. Send the status command (CMD13) to know if the card is in programming
   state or not. If yes, then go to step.5 or else go to step.6.
5. Send the HPI command to bring the card out of programming state.
6. Now send the urgent read request.

In above sequence in step.4, we check if the card is in programming or
not and if it is then we go ahead and send the HPI in step.5 but what if
after step.4 is completed and before the step.5, card moves out of the
programming state so in that case HPI command would timeout as we are
sending it in the wrong state. In that case no command response (by eMMC
protocol) causes mmc_send_hpi_cmd to fail (with -ETIMEOUT error).  In
case the card indeed in TRAN state, no error is reported.

Change-Id: Ia6f81f6cc4ec933f2e8423029f7236401aea04df
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent 989a3a5b
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