Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp221569iob; Wed, 18 May 2022 00:15:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywo9xpUZ/PQO5zHzKDIbMLLfDSD0yJtwCBzMP14LeY63jgc+rOuMyoEbQqsZKYFpajbPCW X-Received: by 2002:a17:90b:3806:b0:1df:99ce:d142 with SMTP id mq6-20020a17090b380600b001df99ced142mr5657590pjb.241.1652858145040; Wed, 18 May 2022 00:15:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652858145; cv=none; d=google.com; s=arc-20160816; b=tq9d5+qkoyLTyic0enDFSVok16wLPQ6GzKHqpS4QIfHUbwa1JuDPu4GlTEos0mXnOB z7nl9F8uWLzkF2HJUOmK1GjNwzeLguhubVrYt6RImw9n/8tMZrcHgdrlsKgM2QgmAqct Vj+Bzc+Eth8/IJPeurN/zSmnqJg/P38OE3Y4G4eBWXsA6yzrilKoMvLGhZQZERjY3USm sXWmbxIn3L1uEeI6rpBj7eTf5+50wDKdJBXJiGuGmS7J1Jc3ExqYd34eS0IaxJktr9Uh blHwUqRjiGCYjPlFwNihsGO/QHZQ/TsOWOKmCppX6uA7hGzz5ZdBhkdvqGap5Nl4BvSe 0KaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=nzQ3RoBzLKBVe4TrsaQAFS0ucwOnGWtgxEuRqF2awk0=; b=KdHNLGYCKNpJHPMc1yJJCwxhaDmfaQHnLA8kz+jAYI1TS5ax5nQiDM1i0hOgqSKlmm 5RhvvRD6XzGWhgU7DxkyK9XJlc5Gk8LSdEdq+U5UcaIt6pk76kolFQXMHqtiUiihNpfa TS3akKLGg5yBDGZxsltgseUhjBzbmSIiRVRInzSiZF/W5iurAxXIwN7j2Njm2W91/kwj iigJTQIlKxC7H+7HhRP/G6tvThDe6Jmr3aMTVCHYt5V+U4ITWiRsaIgg/U/xz5lnCNLz w6kVS5ykJw8+y0Md7Tzu6TdaGtZJMYhTMChX7RcOjbfWxsRQqnP7MBict0uSpl6I1dB+ du4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=KYbMm00Q; 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 u22-20020a17090ae01600b001ded57320absi1675986pjy.24.2022.05.18.00.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 00:15:45 -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=KYbMm00Q; 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 1073B8FD6B; Wed, 18 May 2022 00:03:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231866AbiERHC7 (ORCPT + 99 others); Wed, 18 May 2022 03:02:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231826AbiERHCv (ORCPT ); Wed, 18 May 2022 03:02:51 -0400 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B5AB49C9A; Wed, 18 May 2022 00:02:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1652857370; x=1684393370; h=from:to:cc:subject:date:message-id; bh=nzQ3RoBzLKBVe4TrsaQAFS0ucwOnGWtgxEuRqF2awk0=; b=KYbMm00Q8K97PWU63sISGmjXIsKJeZh8rFn50Xj2Oy9VNL+JRtY+8iq+ OxQiyU5Dupq5rJoDByAfMaeG3LD2c1FEnNd36d1pSNYh4cuKQkJyFVf5z J+kjRqdK2wDkbXfJcN6GDNzmJTWoPphBouBaAAAqP4/eO4zPG7xutaPH1 w=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 18 May 2022 00:02:49 -0700 X-QCInternal: smtphost Received: from ironmsg01-blr.qualcomm.com ([10.86.208.130]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 18 May 2022 00:02:47 -0700 X-QCInternal: smtphost Received: from c-sbhanu-linux.qualcomm.com ([10.242.50.201]) by ironmsg01-blr.qualcomm.com with ESMTP; 18 May 2022 12:32:24 +0530 Received: by c-sbhanu-linux.qualcomm.com (Postfix, from userid 2344807) id 9B68B1756; Wed, 18 May 2022 12:32:22 +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, Rajeshwari Ravindra Kamble Subject: [PATCH V6 0/5] mmc: add error statistics for eMMC and SD card Date: Wed, 18 May 2022 12:32:15 +0530 Message-Id: <1652857340-6040-1-git-send-email-quic_c_sbhanu@quicinc.com> X-Mailer: git-send-email 2.7.4 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 From: Rajeshwari Ravindra Kamble Changes since V5: - Considered all error stats enums to set error state. - Added missed tuning error related code changes which was missed in patch set V5 as Adrain Hunter pointed. - Replaced DEFINE_SIMPLE_ATTRIBUTE with DEFINE_DEBUGFS_ATTRIBUTE as suggested by Adrain Hunter. Changes since V4: - Defined new macro to increment err_stats members when error occured as suggested by Adrain Hunter. - Called err_stats members increment function after printing the error as suggested by Adrain Hunter. - Considered INDEX and END_BIT errors same as CRC errors as suggested by Adrain Hunter. - Removed Null check for host in debug fs functions and Reordered err_stats declarationas suggested by Adrain Hunter. - Removed err_state variable stuff and updated err_state debug fs entry based on the err_stats members state as suggested by Adrain Hunter. Changes since V3: - Dropped error stats feature flag as suggested by Adrain Hunter. - Separated error state related changes in separate patches as suggested by Adrain Hunter. [PATCH V4 4/7] : error state debug fs [PATCH V4 5/7] : error state enable function [PATCH V4 6/7] : error state enable in error case - Note: we are enabling error state before calling sdhci_dumpregs we couldn't add the err state in error stats array as err state is not error type. - Corrected Signed-off-by order as suggested by Bjron Andersson. - Moved error state enable code from sdhci_dumpregs to error conditions as suggested by Adrain Hunter Changes since V2: - Removed userspace error stats clear debug fs entry as suggested by Adrain Hunter. - Split patch into 4 patches [PATCH V3 1/4] : sdhci driver [PATCH V3 2/4] : debug fs entries [PATCH V3 3/4] : core driver [PATCH V3 4/4] : cqhci driver - Used for loop to print error messages instead of using printf statements for all error messages as suggested by Adrain Hunter. - Introduced one flag to enable error stats feature, if any other client wants to use this feature, they need to enable that flag. - Moved reset command timeout error statement to card init flow as suggested by Adrain Hunter. Changes since V1: - Removed sysfs entry for eMMC and SD card error statistics and added debugfs entry as suggested by Adrian Hunter and Ulf Hansson. Shaik Sajida Bhanu (5): mmc: core: Capture eMMC and SD card errors mmc: sdhci: Capture eMMC and SD card errors mmc: debugfs: Add debug fs entry for mmc driver mmc: debugfs: Add debug fs error state entry for mmc driver mmc: cqhci: Capture eMMC and SD card errors drivers/mmc/core/core.c | 10 +++++- drivers/mmc/core/debugfs.c | 79 +++++++++++++++++++++++++++++++++++++++++++ drivers/mmc/host/cqhci-core.c | 9 ++++- drivers/mmc/host/sdhci.c | 59 ++++++++++++++++++++++++-------- drivers/mmc/host/sdhci.h | 3 ++ include/linux/mmc/host.h | 26 ++++++++++++++ include/linux/mmc/mmc.h | 6 ++++ 7 files changed, 175 insertions(+), 17 deletions(-) -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation