diff options
| author | Sahitya Tummala <stummala@codeaurora.org> | 2016-04-26 15:00:04 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-11-30 21:49:31 -0800 |
| commit | 9b97ea99ee9b6647175ed9df724b85f62fc0fbe3 (patch) | |
| tree | d81cb79087138f07fa50ab601511f67d35530ca4 | |
| parent | 118ca5d7279dd5c27578ece5b967f8f791040fde (diff) | |
mmc: core: check if CQE is already disabled before halt/unhalt
Upon any CQ error, the driver tries to halt the CQE first and
if it fails to halt, then CQE is disabled. The error handling
work function mmc_blk_cmdq_err() also tries to HALT the CQE
at couple of places and takes some action based on the HALT
success/error status. But since CQE is disabled, we should not
treat any errors of CQE halt/unhalt as critical and in fact,
we should not even attempt to halt/unhalt.
Change-Id: I6bef9f2c033f78ad0959954acc5d7627e8a92139
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
| -rw-r--r-- | drivers/mmc/core/core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 828d2b85f6e4..6ad91042409e 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1552,6 +1552,12 @@ int mmc_cmdq_halt(struct mmc_host *host, bool halt) { int err = 0; + if (mmc_host_cq_disable(host)) { + pr_debug("%s: %s: CQE is already disabled\n", + mmc_hostname(host), __func__); + return 0; + } + if ((halt && mmc_host_halt(host)) || (!halt && !mmc_host_halt(host))) { pr_debug("%s: %s: CQE is already %s\n", mmc_hostname(host), |
