mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mmc: cqe: Improve CQHCI error logging and recovery reset handling
@ 2026-12-01 17:20 Athira Palliprath via B4 Relay
  2026-12-01 17:20 ` [PATCH 1/2] mmc: cqhci: Log error IRQ details and card R1 status on recovery Athira Palliprath via B4 Relay
  2026-12-01 17:20 ` [PATCH 2/2] mmc: cqe: Reset card on finish halt/clear failure and before final retry Athira Palliprath via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Athira Palliprath via B4 Relay @ 2026-12-01 17:20 UTC (permalink / raw)
  To: Adrian Hunter, Asutosh Das, Ritesh Harjani, Ulf Hansson
  Cc: linux-mmc, linux-kernel, Athira Palliprath

This 2-patch series addresses two diagnostics and recovery gaps in the
eMMC CQE / CQHCI error handling path observed in field crash logs:

1. cqhci_error_irq() currently logs status/cmd_error/data_error/TERRI
   only at pr_debug() level and never reads CQHCI_CRI or CQHCI_CRA on
   Response Error Detected (RED), making bus CRC errors, host timeouts,
   and card NAND ECC errors indistinguishable in production logs.
2. cqhci_recovery_finish() discards failures from its final cqhci_halt()
   and cqhci_clear_all_tasks() calls, and unlike non-CQE recovery, CQE
   never performs mmc_blk_reset() before a failing request's final
   retry as long as CMD48 (which ignores CRC) succeeds.

Patch 1 logs the error IRQ details (plus CRI/CRA when CQHCI_IS_RED is
set) via pr_err_ratelimited() once per recovery trigger.

Patch 2 changes struct mmc_cqe_ops::cqe_recovery_finish() to return int
so final halt/task-clear failures propagate -EIO to mmc_cqe_recovery(),
and triggers mmc_blk_reset() before dispatching a failing request's
final CQE retry.

Signed-off-by: Athira Palliprath <palliprath@chromium.org>
---
Athira Palliprath (2):
      mmc: cqhci: Log error IRQ details and card R1 status on recovery
      mmc: cqe: Reset card on finish halt/clear failure and before final retry

 drivers/mmc/core/block.c      |  6 +++++-
 drivers/mmc/core/core.c       |  9 ++++++---
 drivers/mmc/core/queue.h      |  1 +
 drivers/mmc/host/cqhci-core.c | 25 +++++++++++++++++++++----
 drivers/mmc/host/mmc_hsq.c    |  4 +++-
 include/linux/mmc/host.h      |  2 +-
 6 files changed, 37 insertions(+), 10 deletions(-)
---
base-commit: d2616724e01132376c78872b8324f38659af9f28
change-id: 20261201-cqe-recovery-fix-bbd460447801

Best regards,
-- 
Athira Palliprath <palliprath@chromium.org>



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

end of thread, other threads:[~2026-12-04 12:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 17:20 [PATCH 0/2] mmc: cqe: Improve CQHCI error logging and recovery reset handling Athira Palliprath via B4 Relay
2026-12-01 17:20 ` [PATCH 1/2] mmc: cqhci: Log error IRQ details and card R1 status on recovery Athira Palliprath via B4 Relay
2026-12-04 10:53   ` Adrian Hunter
2026-12-01 17:20 ` [PATCH 2/2] mmc: cqe: Reset card on finish halt/clear failure and before final retry Athira Palliprath via B4 Relay
2026-12-04 12:02   ` Adrian Hunter

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

all inboxes | Powered by JetHome®