linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
To: adrian.hunter@intel.com, ulf.hansson@linaro.org,
	wsa+renesas@sang-engineering.com, shawn.lin@rock-chips.com,
	yoshihiro.shimoda.uh@renesas.com, digetx@gmail.com,
	quic_asutoshd@quicinc.com
Cc: linux-arm-msm@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_rampraka@quicinc.com,
	quic_pragalla@quicinc.com, quic_sartgarg@quicinc.com,
	quic_nitirawa@quicinc.com, quic_sayalil@quicinc.com,
	Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>,
	Liangliang Lu <quic_luliang@quicinc.com>,
	"Bao D . Nguyen" <quic_nguyenb@quicinc.com>
Subject: [PATCH V8 5/5] mmc: cqhci: Capture eMMC and SD card errors
Date: Fri, 27 May 2022 23:23:56 +0530	[thread overview]
Message-ID: <1653674036-21829-6-git-send-email-quic_c_sbhanu@quicinc.com> (raw)
In-Reply-To: <1653674036-21829-1-git-send-email-quic_c_sbhanu@quicinc.com>

Add changes to capture eMMC and SD card errors.
This is useful for debug and testing.

Signed-off-by: Liangliang Lu <quic_luliang@quicinc.com>
Signed-off-by: Sayali Lokhande <quic_sayalil@quicinc.com>
Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
 drivers/mmc/host/cqhci-core.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/host/cqhci-core.c b/drivers/mmc/host/cqhci-core.c
index b0d30c3..b3d7d6d 100644
--- a/drivers/mmc/host/cqhci-core.c
+++ b/drivers/mmc/host/cqhci-core.c
@@ -822,8 +822,15 @@ irqreturn_t cqhci_irq(struct mmc_host *mmc, u32 intmask, int cmd_error,
 	pr_debug("%s: cqhci: IRQ status: 0x%08x\n", mmc_hostname(mmc), status);
 
 	if ((status & (CQHCI_IS_RED | CQHCI_IS_GCE | CQHCI_IS_ICCE)) ||
-	    cmd_error || data_error)
+	    cmd_error || data_error) {
+		if (status & CQHCI_IS_RED)
+			mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_RED);
+		if (status & CQHCI_IS_GCE)
+			mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_GCE);
+		if (status & CQHCI_IS_ICCE)
+			mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_ICCE);
 		cqhci_error_irq(mmc, status, cmd_error, data_error);
+	}
 
 	if (status & CQHCI_IS_TCC) {
 		/* read TCN and complete the request */
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation


  parent reply	other threads:[~2022-05-27 17:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-27 17:53 [PATCH V8 0/5] mmc: add error statistics for eMMC and SD card Shaik Sajida Bhanu
2022-05-27 17:53 ` [PATCH V8 1/5] mmc: core: Capture eMMC and SD card errors Shaik Sajida Bhanu
2022-05-27 17:53 ` [PATCH V8 2/5] mmc: sdhci: " Shaik Sajida Bhanu
2022-05-27 17:53 ` [PATCH V8 3/5] mmc: debugfs: Add debug fs entry for mmc driver Shaik Sajida Bhanu
2022-05-27 17:53 ` [PATCH V8 4/5] mmc: debugfs: Add debug fs error state " Shaik Sajida Bhanu
2022-05-27 17:53 ` Shaik Sajida Bhanu [this message]
2022-05-30  8:12 ` [PATCH V8 0/5] mmc: add error statistics for eMMC and SD card Adrian Hunter
2022-06-01 12:46 ` Ulf Hansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1653674036-21829-6-git-send-email-quic_c_sbhanu@quicinc.com \
    --to=quic_c_sbhanu@quicinc.com \
    --cc=adrian.hunter@intel.com \
    --cc=digetx@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_luliang@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=quic_nitirawa@quicinc.com \
    --cc=quic_pragalla@quicinc.com \
    --cc=quic_rampraka@quicinc.com \
    --cc=quic_sartgarg@quicinc.com \
    --cc=quic_sayalil@quicinc.com \
    --cc=shawn.lin@rock-chips.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).