Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2441095ioo; Sat, 28 May 2022 13:48:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw5/GnWBJhvuWqhgJ2jFOcE+xfXT1IiRNRLa3jCJgL+MNVcBkfzGwfwnrRNXzbPRTaW2A4R X-Received: by 2002:aa7:951c:0:b0:518:4c30:6ca4 with SMTP id b28-20020aa7951c000000b005184c306ca4mr45432028pfp.12.1653770907846; Sat, 28 May 2022 13:48:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653770907; cv=none; d=google.com; s=arc-20160816; b=E9z6xxTcy2a1pJdcy34YSZs0TEkIz9t9MPakXAAwRUC5IMgb3aHYLW9YT1W1yWiSzx rsnpW4flav22Vemvpg/DbKiAH1cIINQZW/lyZ5d2SjcuPY+am2mC4K9s5JgEpb2U3N+g 14XMACUCfjnhh9UHaSggUuANORki6IzORMoZaWnIaX0Jdk7J9hPsSDe4Er5yNLscaCUz swKUgwiKvEXZWr4opWnshO5j2T8QG3ZIRfBVSoYuplFlhOBrphTEMO9urLsjqEH/P/lu Y6Mt+uAYL2FZR7F25eLn8ElP5TxCEW3nOBT1WLgsu7eY2jng94xZPX0laajlXaoOOdsQ CLMA== 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=YSsOYCG8mlFpydGfmeGAbfBQLsc4W8EjWQN8m3ZSxf8=; b=R/HttDa0u1dprHLbiVlFzAhGXcKTjsNV7f/JZ/+WR124XS/oMzjw5LDWOL9zqnZ7zt 4dnQ36RBDdIqCXuU2mDzjVZFdfIVKTY7YUyVHMxd7vFM1k7VeF3rE73/PZtTMVdked8r 6pVGkmKlIPg6j4IHS+S/Ji5dvkRwYSnYBKGsQ/7a2cnmVKKwtcvjvd6YW1Vg2Dxdel+2 3qeo5RrEIr8AuWhAMm7mwxk23KcYWBt0EL6EQcZ00k8TXCBTJ2VtdscrLlv9VQI8kV7Q 6JxU//7vBchvswMxHsgp+rLfKdgVGsac9YCJsqr9Da6bMjtMbxtZlMxgo+dIKMOHKZ8F t+mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UYeInsCM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id u24-20020a634718000000b003f5d223885bsi10205978pga.591.2022.05.28.13.48.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 13:48:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=UYeInsCM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5440879815; Sat, 28 May 2022 12:58:04 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233769AbiE0Ryb (ORCPT + 99 others); Fri, 27 May 2022 13:54:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354357AbiE0RyZ (ORCPT ); Fri, 27 May 2022 13:54:25 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9599C5E76; Fri, 27 May 2022 10:54:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1653674064; x=1685210064; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=YSsOYCG8mlFpydGfmeGAbfBQLsc4W8EjWQN8m3ZSxf8=; b=UYeInsCMNJxyPvYTs+4AFirQY5huEMxM465O8gm2LSlIf+vDl3mjUe0p 2paQuK/F+qFwUWu6h+QPnEq0gphN/w8/gUbzpdO6vjeCR6MZoxYn6avMF h+yI18Jy5xMs/ZzVytW/CzJhqErWJeGjzUDAqAnA4E6dTl0D2sOkN83iU w=; Received: from ironmsg-lv-alpha.qualcomm.com ([10.47.202.13]) by alexa-out.qualcomm.com with ESMTP; 27 May 2022 10:54:24 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg-lv-alpha.qualcomm.com with ESMTP/TLS/AES256-SHA; 27 May 2022 10:54:23 -0700 X-QCInternal: smtphost Received: from c-sbhanu-linux.qualcomm.com ([10.242.50.201]) by ironmsg01-blr.qualcomm.com with ESMTP; 27 May 2022 23:24:05 +0530 Received: by c-sbhanu-linux.qualcomm.com (Postfix, from userid 2344807) id 7C8571846; Fri, 27 May 2022 23:24:04 +0530 (IST) From: Shaik Sajida Bhanu 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 , Liangliang Lu , "Bao D . Nguyen" Subject: [PATCH V8 5/5] mmc: cqhci: Capture eMMC and SD card errors Date: Fri, 27 May 2022 23:23:56 +0530 Message-Id: <1653674036-21829-6-git-send-email-quic_c_sbhanu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1653674036-21829-1-git-send-email-quic_c_sbhanu@quicinc.com> References: <1653674036-21829-1-git-send-email-quic_c_sbhanu@quicinc.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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: 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 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