diff options
author | Venkat Gopalakrishnan <venkatg@codeaurora.org> | 2014-10-07 17:28:52 -0700 |
---|---|---|
committer | Subhash Jadavani <subhashj@codeaurora.org> | 2016-05-19 18:35:51 -0700 |
commit | 6be2ee021df7a86835ca9e049a6bbae2a08bfd9f (patch) | |
tree | be0f76a868c79bccdda9974b1025d7665c82a205 | |
parent | 8e588a1be26b85ad5d6dd4bcb1c1b1a44d1aa253 (diff) |
mmc: sdhci: Reset cmd err only for sbc commands
The data complete interrupt is also used to indicate that a
busy state has ended. Fix a race condition between sdhci_cmd_irq()
that sets any cmd err and sdhci_data_irq() (received to indicate
end of busy state) that clears cmd error. This can happen when a
cmd err is set and finish tasklet is scheduled but sdhci_data_irq()
executes before the tasklet. The cmd err status is critical for the
tasklet handler to reset the controller's state machine. This
should be cleared only when we have successfully processed a sbc
command and are ready to submit the actual command next, not when
there is an actual cmd err.
CRs-fixed: 733074
Change-Id: I91ea2b949c34446fb629446aabb21505734e27bb
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
-rw-r--r-- | drivers/mmc/host/sdhci.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 766068662f49..9323d7fbef1d 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1106,10 +1106,9 @@ static void sdhci_finish_command(struct sdhci_host *host) } } - host->cmd->error = 0; - /* Finished CMD23, now send actual command. */ if (host->cmd == host->mrq->sbc) { + host->cmd->error = 0; host->cmd = NULL; sdhci_send_command(host, host->mrq->cmd); } else { |