Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1288496pxb; Fri, 21 Jan 2022 14:27:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJw90zSwQb1AA2ADk23O0vFbEVHxvSLgsVyiEFohRmuplKQiIrxdJUDW0xpkQBPPXvnLPis2 X-Received: by 2002:a62:b503:0:b0:4bc:657e:cfa6 with SMTP id y3-20020a62b503000000b004bc657ecfa6mr5259252pfe.25.1642804033057; Fri, 21 Jan 2022 14:27:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642804033; cv=none; d=google.com; s=arc-20160816; b=GJPVMcbrMfaGP8YB1DSRUU9KQUrB8a/5ywbJZsRc3KeOmjYSrwLVZJIWxkvhnB5JL+ v6A1qQbUy0n/3vZIuPj+/166UK2z6D1wM65yladFDlLCrogGWRdnPTIPwP1BO8NMMWvP m91p1IQx06kAYJHHqNKF9vEDlv1Nv3reFaoZqHcZlFHk8eWVNHXVYc50SJ0JuK7Vfbpz C4BdnPLCdmMYtTJPKBESlh/ZJwOwCa1yMK6BHNuVLSdd67h2J+CNFS6X/h+WDXDLoc29 pPWwZiTXacKwGjgYHAuC7R+/igQTr6TKYW+6Eqs8/Jjk8ha51ATe1868m2g3iuY+ByGz m8Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=WKv6tCtQgSCkfw+0HJkKanv62ISYhKm0cbdrYhfgvT0=; b=J4EtYTLVxjBDc+IPepEDNA+V70zaOjhzd4FBJ/Rd629wQHY1qhlc0SDNhEqnJiNPYQ 4Z/13fgeok6KRaTMtbVA9OOOhfydrqHDwEWa2Sv7/aPOIl2BxqaVcdn6xZw89pNGoq9s Ut7dptQ2I1bIoiHZ8i80d/zU6c2FWiYc8UTUJAvOS4cYfWxYN3hrSLSETY5UjwG/p1/o RjJK61yQe3LuvOTBNaJEP+o0I6SsD2dtKZFcm7lBcS6VCF6NNY/jdWiTa2SCZkL4qoOn jVrt4wWYq1+rU3U4Stv1hNYR4ZMghOkDsh482Dg6vx0vNqEgrf+Z95LnJU8WNfOAx48x i2gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=xutkIUzW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si8659575plf.137.2022.01.21.14.27.00; Fri, 21 Jan 2022 14:27:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=xutkIUzW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232904AbiATR2Q (ORCPT + 99 others); Thu, 20 Jan 2022 12:28:16 -0500 Received: from alexa-out.qualcomm.com ([129.46.98.28]:38887 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346829AbiATR0z (ORCPT ); Thu, 20 Jan 2022 12:26:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1642699615; x=1674235615; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=WKv6tCtQgSCkfw+0HJkKanv62ISYhKm0cbdrYhfgvT0=; b=xutkIUzWDwKZOkA7ynExj+Yx6XnT9kLFC8OJDxiyqCktOhVg5trAPp9e ThlwgSBkNQAJXNjvyOlms6NVUGUh5gT3mt9t51SeJf+Y2rRI7mt9tTmXM ukEg/hI9IxnVtdCzsoHyNgSyPS5yu9WhcGEAiK5PfvjzC7Of6Opz1FLhc A=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 20 Jan 2022 09:26:55 -0800 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 20 Jan 2022 09:26:53 -0800 X-QCInternal: smtphost Received: from c-sbhanu-linux.qualcomm.com ([10.242.50.201]) by ironmsg01-blr.qualcomm.com with ESMTP; 20 Jan 2022 22:56:41 +0530 Received: by c-sbhanu-linux.qualcomm.com (Postfix, from userid 2344807) id 786FB538E; Thu, 20 Jan 2022 22:56:39 +0530 (IST) From: Shaik Sajida Bhanu To: adrian.hunter@intel.com, quic_asutoshd@quicinc.com, ulf.hansson@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: stummala@codeaurora.org, vbadigan@codeaurora.org, quic_rampraka@quicinc.com, quic_pragalla@quicinc.com, sartgarg@codeaurora.org, nitirawa@codeaurora.org, sayalil@codeaurora.org, Shaik Sajida Bhanu , Liangliang Lu , "Bao D . Nguyen" Subject: [PATCH V3 4/4] mmc: cqhci: Capture eMMC and SD card errors Date: Thu, 20 Jan 2022 22:56:22 +0530 Message-Id: <1642699582-14785-5-git-send-email-quic_c_sbhanu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1642699582-14785-1-git-send-email-quic_c_sbhanu@quicinc.com> References: <1642699582-14785-1-git-send-email-quic_c_sbhanu@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add changes to capture eMMC and SD card errors. This is useful for debug and testing. Signed-off-by: Shaik Sajida Bhanu Signed-off-by: Liangliang Lu Signed-off-by: Sayali Lokhande Signed-off-by: Bao D. Nguyen Signed-off-by: Ram Prakash Gupta --- 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..2908d30 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->err_stats_enabled) + mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_RED); + if ((status & CQHCI_IS_GCE) && (mmc->err_stats_enabled)) + mmc_debugfs_err_stats_inc(mmc, MMC_ERR_CMDQ_GCE); + if ((status & CQHCI_IS_ICCE) && mmc->err_stats_enabled) + 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