Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a10a590e authored by Ram Prakash Gupta's avatar Ram Prakash Gupta
Browse files

mmc: host: Print cqhci state if request is for same



During system suspend CQE halted by queue suspend even before
mmc halt. When mmc host suspend calls halt helper, CQE is already
halted. Log event if same state change is requested.

Change-Id: I9456ce222f5dd0465c814d958c8ae3f2f713ff96
Signed-off-by: default avatarRam Prakash Gupta <rampraka@codeaurora.org>
parent e0361e85
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -375,8 +375,11 @@ static void cqhci_off(struct mmc_host *mmc)
	bool timed_out;
	u32 reg;

	if (!cq_host->enabled || !mmc->cqe_on || cq_host->recovery_halt)
	if (!cq_host->enabled || !mmc->cqe_on || cq_host->recovery_halt) {
		pr_debug("%s: %s: CQE is already %s\n", mmc_hostname(mmc),
				__func__, mmc->cqe_on ? "off" : "on");
		return;
	}

	if (cq_host->ops->disable)
		cq_host->ops->disable(mmc, false);
@@ -990,8 +993,10 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout)
	bool ret;
	u32 ctl;

	if (cqhci_halted(cq_host))
	if (cqhci_halted(cq_host)) {
		pr_debug("%s: CQE is already halted.\n", mmc_hostname(mmc));
		return true;
	}

	cqhci_set_irqs(cq_host, CQHCI_IS_HAC);

@@ -1007,7 +1012,7 @@ static bool cqhci_halt(struct mmc_host *mmc, unsigned int timeout)
	ret = cqhci_halted(cq_host);

	if (!ret)
		pr_debug("%s: cqhci: Failed to halt\n", mmc_hostname(mmc));
		pr_err("%s: cqhci: Failed to halt\n", mmc_hostname(mmc));

	mmc_log_string(mmc, "halt done with ret %d\n", ret);
	return ret;