[PATCH RFC 19/39] mmc: core: Turn off CQE before sending commands

Adrian Hunter
2017-02-10T13:10:53Z

Turn off the CQE before sending commands, and ensure it is off in any reset
or power management paths.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
---
drivers/mmc/core/core.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 7f2e75db93d4..916bae093929 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -259,6 +259,9 @@ static void __mmc_start_request(struct mmc_host *host, struct mmc_request *mrq)

trace_mmc_request_start(host, mrq);

+ if (host->cqe_on)
+ host->cqe_ops->cqe_off(host);
+
host->ops->request(host, mrq);
}

@@ -1229,6 +1232,9 @@ void mmc_set_bus_width(struct mmc_host *host, unsigned int width)
*/
void mmc_set_initial_state(struct mmc_host *host)
{
+ if (host->cqe_on)
+ host->cqe_ops->cqe_off(host);
+
mmc_retune_disable(host);

if (mmc_host_is_spi(host))
--
1.9.1