Commit d0e2d0b8 authored by Adrian Hunter's avatar Adrian Hunter Committed by sanglipeng
Browse files

mmc: cqhci: Warn of halt or task clear failure

stable inclusion
from stable-v5.10.203
commit cb9ca7cc273b27c0daf387f735d90d4ea52283ee
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9GXII

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cb9ca7cc273b27c0daf387f735d90d4ea52283ee



--------------------------------

[ Upstream commit 35597bdb04ec27ef3b1cea007dc69f8ff5df75a5 ]

A correctly operating controller should successfully halt and clear tasks.
Failure may result in errors elsewhere, so promote messages from debug to
warnings.

Fixes: a4080225 ("mmc: cqhci: support for command queue enabled host")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Reviewed-by: default avatarAvri Altman <avri.altman@wdc.com>
Link: https://lore.kernel.org/r/20231103084720.6886-6-adrian.hunter@intel.com


Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent be9abdf7
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -890,7 +890,7 @@ static bool cqhci_clear_all_tasks(struct mmc_host *mmc, unsigned int timeout)
	ret = cqhci_tasks_cleared(cq_host);

	if (!ret)
		pr_debug("%s: cqhci: Failed to clear tasks\n",
		pr_warn("%s: cqhci: Failed to clear tasks\n",
			mmc_hostname(mmc));

	return ret;
@@ -924,7 +924,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_warn("%s: cqhci: Failed to halt\n", mmc_hostname(mmc));

	return ret;
}