public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: cqhci: Be more verbose in error irq handler
@ 2023-10-16  9:56 Kornel Dulęba
  2023-10-20  7:40 ` Adrian Hunter
  0 siblings, 1 reply; 11+ messages in thread
From: Kornel Dulęba @ 2023-10-16  9:56 UTC (permalink / raw)
  To: linux-mmc, linux-kernel
  Cc: Adrian Hunter, Ritesh Harjani, Asutosh Das, Ulf Hansson,
	Radoslaw Biernacki, Guenter Roeck, Gwendal Grignou, upstream,
	Kornel Dulęba

There are several reasons for controller to generate an error interrupt.
They include controller<->card timeout, and CRC mismatch error.
Right now we only get one line in the logs stating that CQE recovery was
triggered, but with no information about what caused it.
To figure out what happened be more verbose and dump the registers from
irq error handler logic.
This matches the behaviour of the software timeout logic, see
cqhci_timeout.

Signed-off-by: Kornel Dulęba <korneld@chromium.org>
---
 drivers/mmc/host/cqhci-core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c
index b3d7d6d8d654..33abb4bd53b5 100644
--- a/drivers/mmc/host/cqhci-core.c
+++ b/drivers/mmc/host/cqhci-core.c
@@ -700,8 +700,9 @@ static void cqhci_error_irq(struct mmc_host *mmc, u32 status, int cmd_error,
 
 	terri = cqhci_readl(cq_host, CQHCI_TERRI);
 
-	pr_debug("%s: cqhci: error IRQ status: 0x%08x cmd error %d data error %d TERRI: 0x%08x\n",
-		 mmc_hostname(mmc), status, cmd_error, data_error, terri);
+	pr_warn("%s: cqhci: error IRQ status: 0x%08x cmd error %d data error %d\n",
+		 mmc_hostname(mmc), status, cmd_error, data_error);
+	cqhci_dumpregs(cq_host);
 
 	/* Forget about errors when recovery has already been triggered */
 	if (cq_host->recovery_halt)
-- 
2.42.0.655.g421f12c284-goog


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-10-26  9:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16  9:56 [PATCH] mmc: cqhci: Be more verbose in error irq handler Kornel Dulęba
2023-10-20  7:40 ` Adrian Hunter
2023-10-20  8:53   ` Kornel Dulęba
2023-10-23 11:38     ` Adrian Hunter
2023-10-25  8:01       ` Kornel Dulęba
2023-10-26  6:25         ` Adrian Hunter
2023-10-26  7:56           ` Kornel Dulęba
2023-10-26  8:14             ` Adrian Hunter
2023-10-26  8:29               ` Kornel Dulęba
2023-10-26  8:51                 ` Adrian Hunter
2023-10-26  9:32                   ` Kornel Dulęba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox