diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2016-12-01 09:23:47 -0800 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-01 09:23:47 -0800 |
| commit | 6b90aa18beb76306904e081061bd820705cabd1e (patch) | |
| tree | ad33b2232cfabf2edf2773d87cc583733f19b904 | |
| parent | e7211aacd500fca23eb9eb15629753ee5cdf6a55 (diff) | |
| parent | 9b97ea99ee9b6647175ed9df724b85f62fc0fbe3 (diff) | |
Merge "mmc: core: check if CQE is already disabled before halt/unhalt"
| -rw-r--r-- | drivers/mmc/core/core.c | 6 | ||||
| -rw-r--r-- | drivers/mmc/host/cmdq_hci.c | 10 | ||||
| -rw-r--r-- | drivers/mmc/host/sdhci.c | 2 |
3 files changed, 16 insertions, 2 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), diff --git a/drivers/mmc/host/cmdq_hci.c b/drivers/mmc/host/cmdq_hci.c index 0e0a018f39be..52427815722b 100644 --- a/drivers/mmc/host/cmdq_hci.c +++ b/drivers/mmc/host/cmdq_hci.c @@ -863,8 +863,16 @@ skip_cqterri: * If CQE halt fails then, disable CQE * from processing any further requests */ - if (ret) + if (ret) { cmdq_disable_nosync(mmc, true); + /* + * Enable legacy interrupts as CQE halt has failed. + * This is needed to send legacy commands like status + * cmd as part of error handling work. + */ + if (cq_host->ops->clear_set_irqs) + cq_host->ops->clear_set_irqs(mmc, false); + } /* * CQE detected a reponse error from device diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 0542ba51445f..886229317fea 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3157,7 +3157,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id) do { if (host->mmc->card && mmc_card_cmdq(host->mmc->card) && - !mmc_host_halt(host->mmc)) { + !mmc_host_halt(host->mmc) && !mmc_host_cq_disable(host->mmc)) { pr_debug("*** %s: cmdq intr: 0x%08x\n", mmc_hostname(host->mmc), intmask); |
