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

Commit 6b90aa18 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "mmc: core: check if CQE is already disabled before halt/unhalt"

parents e7211aac 9b97ea99
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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),
+9 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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);