From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A33AFC4321E for ; Mon, 23 May 2022 07:24:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229733AbiEWHYc (ORCPT ); Mon, 23 May 2022 03:24:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230109AbiEWHXi (ORCPT ); Mon, 23 May 2022 03:23:38 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57C77326D2; Mon, 23 May 2022 00:16:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653290166; x=1684826166; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=3UbSzEjOzFt/9he+kuRwI8OUsAZ7HuOJpG17W7cZX9A=; b=IqrIowFrL6ilW5KjsqiqqFli8Cdzflm9mvaVVBZrehyjdIgszaUE73X8 oQ/fZoXJqQJWOye0iOWy7aAn1ktyC3RO3EoeC4WE7rvMWPkslGD2T6X53 msiIHhqywaA6HmDbCIGTB4Lq0kodxBaKM+PdDxtzbFh4PFpEUChaX4wWe 8UqOWS1fdp/JAbbc7fYt7y4FXdmHlpgbgBOOcrHfTqB6JZ1012wtnhPYB 4jqfkkJSwk2UC9t255R3zmGOZdhPywTojdsDOhdubOXomiyFdxoNfElT9 bsmiMaImGXbvQjLwhx2Bt0uXt3JczKtIqzOEUyDDCvsf4Dbr70M4BfR0O A==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="298445337" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="298445337" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 00:16:06 -0700 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="600489056" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.56.27]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 00:16:00 -0700 Message-ID: Date: Mon, 23 May 2022 10:15:56 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.9.1 Subject: Re: [PATCH V6 5/5] mmc: cqhci: Capture eMMC and SD card errors Content-Language: en-US To: Shaik Sajida Bhanu , 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, Liangliang Lu , "Bao D . Nguyen" References: <1652857340-6040-1-git-send-email-quic_c_sbhanu@quicinc.com> <1652857340-6040-6-git-send-email-quic_c_sbhanu@quicinc.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: <1652857340-6040-6-git-send-email-quic_c_sbhanu@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org On 18/05/22 10:02, Shaik Sajida Bhanu wrote: > Add changes to capture eMMC and SD card errors. > This is useful for debug and testing. > > Signed-off-by: Liangliang Lu > Signed-off-by: Sayali Lokhande > Signed-off-by: Bao D. Nguyen > Signed-off-by: Ram Prakash Gupta > Signed-off-by: Shaik Sajida Bhanu Acked-by: Adrian Hunter > --- > 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 31f8412..7f25cca 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 */