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

Commit a4dbe3db authored by Ritesh Harjani's avatar Ritesh Harjani
Browse files

mmc: cmdq_hci: Move cmdq_dumpregs before clearing & halt



Move cmdq_dumpregs before we do any controller operation.
Otherwise in case of ADMA error we do not see SDHCI_INT_STATUS
register properly.

Change-Id: Ie9a38bc2e729a7f261cf05975210591ea2693dee
Signed-off-by: default avatarRitesh Harjani <riteshh@codeaurora.org>
parent fce66d6e
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -925,6 +925,7 @@ irqreturn_t cmdq_irq(struct mmc_host *mmc, int err)
		pr_err("%s: err: %d status: 0x%08x task-err-info (0x%08lx)\n",
		pr_err("%s: err: %d status: 0x%08x task-err-info (0x%08lx)\n",
		       mmc_hostname(mmc), err, status, err_info);
		       mmc_hostname(mmc), err, status, err_info);


		cmdq_dumpregs(cq_host);
		/*
		/*
		 * Need to halt CQE in case of error in interrupt context itself
		 * Need to halt CQE in case of error in interrupt context itself
		 * otherwise CQE may proceed with sending CMD to device even if
		 * otherwise CQE may proceed with sending CMD to device even if
@@ -936,7 +937,6 @@ irqreturn_t cmdq_irq(struct mmc_host *mmc, int err)
		if (ret)
		if (ret)
			pr_err("%s: %s: halt failed ret=%d\n",
			pr_err("%s: %s: halt failed ret=%d\n",
					mmc_hostname(mmc), __func__, ret);
					mmc_hostname(mmc), __func__, ret);

		/*
		/*
		 * Clear the CQIS after halting incase of error. This is done
		 * Clear the CQIS after halting incase of error. This is done
		 * because if CQIS is cleared before halting, the CQ will
		 * because if CQIS is cleared before halting, the CQ will
@@ -947,8 +947,6 @@ irqreturn_t cmdq_irq(struct mmc_host *mmc, int err)
		 */
		 */
		cmdq_writel(cq_host, status, CQIS);
		cmdq_writel(cq_host, status, CQIS);


		cmdq_dumpregs(cq_host);

		if (!err_info) {
		if (!err_info) {
			/*
			/*
			 * It may so happen sometimes for few errors(like ADMA)
			 * It may so happen sometimes for few errors(like ADMA)