Commit 521cdcea authored by Sujit Reddy Thumma's avatar Sujit Reddy Thumma Committed by Linux Build Service Account
Browse files

mmc: msm_sdcc: Send CMD12 even if r/w command has errors



In SD/eMMC cards read/write multi block commands (CMD18/CMD25)
cause state transition from Transfer state to Data/Receive
state. If there are errors in recieving the response for
these commands the driver doesn't send CMD12 to stop the
transaction and hence the card forever be in Data/Rcv
state until further CMD7 or CMD12 is issued. Fix this by
sending  CMD12 (STOP_TRANSMISSION) to change the state back to
transfer mode aborting data transfers.

Note: With current r/w command response it is impossible to
determine if the card has actually transitioned to Data/Rcv
state since the actual card status is reflected at execution
time. Also, there may be errors in "sending" CMD18/25 itself.
Sending CMD12 in this case doesn't cause any harm except one
more command timeout error which is non-fatal.

Change-Id: I1e298260d39cfac796113a4276652626c4011fc3
Signed-off-by: default avatarSujit Reddy Thumma <sthumma@codeaurora.org>
parent 6fabf378
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment