All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sajida Bhanu (Temp) (QUIC)" <quic_c_sbhanu@quicinc.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
	Adrian Hunter <adrian.hunter@intel.com>
Cc: "Sajida Bhanu (Temp) (QUIC)" <quic_c_sbhanu@quicinc.com>,
	"riteshh@codeaurora.org" <riteshh@codeaurora.org>,
	"Asutosh Das (asd)" <asutoshd@quicinc.com>,
	"agross@kernel.org" <agross@kernel.org>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"stummala@codeaurora.org" <stummala@codeaurora.org>,
	"vbadigan@codeaurora.org" <vbadigan@codeaurora.org>,
	"Ram Prakash Gupta (QUIC)" <quic_rampraka@quicinc.com>,
	"Pradeep Pragallapati (QUIC)" <quic_pragalla@quicinc.com>,
	"sartgarg@codeaurora.org" <sartgarg@codeaurora.org>,
	"nitirawa@codeaurora.org" <nitirawa@codeaurora.org>,
	"sayalil@codeaurora.org" <sayalil@codeaurora.org>
Subject: RE: [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card err_stat sysfs entry
Date: Fri, 3 Dec 2021 08:42:11 +0000	[thread overview]
Message-ID: <SJ0PR02MB844996EAD138FE57F0B54517CD6A9@SJ0PR02MB8449.namprd02.prod.outlook.com> (raw)
In-Reply-To: <CAPDyKFpihKExf2qiPuHtbJitP-q21rFCY-MNMdvAvbQd1C2_jA@mail.gmail.com>

Hi,

Thank you for suggestion .. will make the changes .

Thanks,
Sajida
-----Original Message-----
From: Ulf Hansson <ulf.hansson@linaro.org> 
Sent: Thursday, December 2, 2021 1:35 PM
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Sajida Bhanu (Temp) (QUIC) <quic_c_sbhanu@quicinc.com>; riteshh@codeaurora.org; Asutosh Das (asd) <asutoshd@quicinc.com>; agross@kernel.org; bjorn.andersson@linaro.org; linux-mmc@vger.kernel.org; linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org; stummala@codeaurora.org; vbadigan@codeaurora.org; Ram Prakash Gupta (QUIC) <quic_rampraka@quicinc.com>; Pradeep Pragallapati (QUIC) <quic_pragalla@quicinc.com>; sartgarg@codeaurora.org; nitirawa@codeaurora.org; sayalil@codeaurora.org
Subject: Re: [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card err_stat sysfs entry

On Thu, 2 Dec 2021 at 08:28, Adrian Hunter <adrian.hunter@intel.com> wrote:
>
> On 02/12/2021 08:42, Sajida Bhanu (Temp) (QUIC) wrote:
> > Gentle Reminder.
> >
> > Thanks,
> > Sajida
> > -----Original Message-----
> > From: Sajida Bhanu (Temp) (QUIC) <quic_c_sbhanu@quicinc.com>
> > Sent: Friday, November 26, 2021 10:54 AM
> > To: Ulf Hansson <ulf.hansson@linaro.org>; Sajida Bhanu (Temp) (QUIC) 
> > <quic_c_sbhanu@quicinc.com>
> > Cc: adrian.hunter@intel.com; riteshh@codeaurora.org; Asutosh Das 
> > (asd) <asutoshd@quicinc.com>; agross@kernel.org; 
> > bjorn.andersson@linaro.org; linux-mmc@vger.kernel.org; 
> > linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org; 
> > stummala@codeaurora.org; vbadigan@codeaurora.org; Ram Prakash Gupta 
> > (QUIC) <quic_rampraka@quicinc.com>; Pradeep Pragallapati (QUIC) 
> > <quic_pragalla@quicinc.com>; sartgarg@codeaurora.org; 
> > nitirawa@codeaurora.org; sayalil@codeaurora.org
> > Subject: RE: [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card 
> > err_stat sysfs entry
> >
> >
> >
> > -----Original Message-----
> > From: Ulf Hansson <ulf.hansson@linaro.org>
> > Sent: Thursday, November 25, 2021 5:01 PM
> > To: Sajida Bhanu (Temp) (QUIC) <quic_c_sbhanu@quicinc.com>
> > Cc: adrian.hunter@intel.com; riteshh@codeaurora.org; Asutosh Das 
> > (asd) <asutoshd@quicinc.com>; agross@kernel.org; 
> > bjorn.andersson@linaro.org; linux-mmc@vger.kernel.org; 
> > linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org; 
> > stummala@codeaurora.org; vbadigan@codeaurora.org; Ram Prakash Gupta 
> > (QUIC) <quic_rampraka@quicinc.com>; Pradeep Pragallapati (QUIC) 
> > <quic_pragalla@quicinc.com>; sartgarg@codeaurora.org; 
> > nitirawa@codeaurora.org; sayalil@codeaurora.org
> > Subject: Re: [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card 
> > err_stat sysfs entry
> >
> > On Wed, 17 Nov 2021 at 07:20, Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com> wrote:
> >>
> >> Add sysfs entry to query eMMC and SD card errors statistics.
> >> This feature is useful for debug and testing.
> >>
> >> Signed-off-by: Shaik Sajida Bhanu <quic_c_sbhanu@quicinc.com>
> >> ---
> >>  drivers/mmc/host/cqhci.h     |   1 +
> >>  drivers/mmc/host/sdhci-msm.c | 192 +++++++++++++++++++++++++++++++++++++++++++
> >>  drivers/mmc/host/sdhci.c     |  17 ++++
> >>  drivers/mmc/host/sdhci.h     |   1 +
> >>  include/linux/mmc/host.h     |   1 +
> >>  5 files changed, 212 insertions(+)
> >
> > To allow an easier review, I strongly suggest splitting up the changes in smaller pieces. Maybe in three steps: add interfaces, implement them, add sysfs - or something along those lines.
> >
> > I am also trying to understand the benefit of having these stats available. Can you perhaps share a little bit of background on how they are usable for you? Is it for debug purpose or does it have other purposes too?
> >
> > If it turns out that we agree on finding these stats valuable for us, then I am inclined to think that this should be integrated closer with the mmc core.
> >
> > The error codes that are propagated to the core from failed requests are common error codes, so we should be able to use that information from the core itself, I think.
> >
> > Kind regards
> > Uffe
> >
> > Hi Ulf,
> >
> > Thanks for the review
> >
> > I am also trying to understand the benefit of having these stats available. Can you perhaps share a little bit of background on how they are usable for you? Is it for debug purpose or does it have other purposes too?
> >
> >>>>>>>>>>>>> These changes for debug purpose only .. if any errors occurred while testing eMMC and SD card those will be captured in these sysfs entries ,  we can directly go and check the sysfs entries and get to know what is the error occurred in driver level.
>
> I would suggest using debugfs and adding support in mmc host debugfs 
> e.g.
>
> static inline void mmc_debugfs_err_stats_enable(struct mmc_host *mmc) 
> {
>         mmc->err_stats_enabled = true; }
>
> enum mmc_err_stat {
>         MMC_ERR_CMD_TIMEOUT,
>         MMC_ERR_CMD_CRC,
>         MMC_ERR_DAT_TIMEOUT,
>         MMC_ERR_DAT_CRC,
>         MMC_ERR_AUTO_CMD,
>         MMC_ERR_ADMA,
>         MMC_ERR_TUNING,
>         MMC_ERR_CMDQ_RED,
>         MMC_ERR_CMDQ_GCE,
>         MMC_ERR_CMDQ_ICCE,
>         MMC_ERR_REQ_TIMEOUT,
>         MMC_ERR_CMDQ_REQ_TIMEOUT,
>         MMC_ERR_ICE_CFG,
>         MMC_ERR_MAX,
> };
>
> static inline void mmc_debugfs_err_stats_inc(struct mmc_host *mmc, 
> enum mmc_err_stat stat) {
>         mmc->err_stats[stat] += 1;
> }
>
> And amend mmc_add_host_debugfs() to create the err_stats file etc.
>
> sdhci.c could call mmc_debugfs_err_stats_enable() and mmc_debugfs_err_stats_inc() as needed.
> cqhci.c could call mmc_debugfs_err_stats_inc() as needed.
>
> Ulf, does that sound reasonable?

Yes, it does! Thanks for having a closer look!

[...]

Kind regards
Uffe

      reply	other threads:[~2021-12-03  8:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-17  6:20 [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card err_stat sysfs entry Shaik Sajida Bhanu
2021-11-17  7:44 ` Adrian Hunter
2021-11-22 10:05   ` Sajida Bhanu (Temp) (QUIC)
2021-11-25  7:56     ` Adrian Hunter
2021-11-17 13:39 ` kernel test robot
2021-11-17 13:39   ` kernel test robot
2021-11-25 11:30 ` Ulf Hansson
2021-11-26  5:24   ` Sajida Bhanu (Temp) (QUIC)
2021-12-02  6:42     ` Sajida Bhanu (Temp) (QUIC)
2021-12-02  7:28       ` Adrian Hunter
2021-12-02  8:05         ` Ulf Hansson
2021-12-03  8:42           ` Sajida Bhanu (Temp) (QUIC) [this message]

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=SJ0PR02MB844996EAD138FE57F0B54517CD6A9@SJ0PR02MB8449.namprd02.prod.outlook.com \
    --to=quic_c_sbhanu@quicinc.com \
    --cc=adrian.hunter@intel.com \
    --cc=agross@kernel.org \
    --cc=asutoshd@quicinc.com \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=nitirawa@codeaurora.org \
    --cc=quic_pragalla@quicinc.com \
    --cc=quic_rampraka@quicinc.com \
    --cc=riteshh@codeaurora.org \
    --cc=sartgarg@codeaurora.org \
    --cc=sayalil@codeaurora.org \
    --cc=stummala@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vbadigan@codeaurora.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.