[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <SJ0PR02MB844996EAD138FE57F0B54517CD6A9@SJ0PR02MB8449.namprd02.prod.outlook.com>
Date: Fri, 3 Dec 2021 08:42:11 +0000
From: "Sajida Bhanu (Temp) (QUIC)" <quic_c_sbhanu@...cinc.com>
To: Ulf Hansson <ulf.hansson@...aro.org>,
Adrian Hunter <adrian.hunter@...el.com>
CC: "Sajida Bhanu (Temp) (QUIC)" <quic_c_sbhanu@...cinc.com>,
"riteshh@...eaurora.org" <riteshh@...eaurora.org>,
"Asutosh Das (asd)" <asutoshd@...cinc.com>,
"agross@...nel.org" <agross@...nel.org>,
"bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
"linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"stummala@...eaurora.org" <stummala@...eaurora.org>,
"vbadigan@...eaurora.org" <vbadigan@...eaurora.org>,
"Ram Prakash Gupta (QUIC)" <quic_rampraka@...cinc.com>,
"Pradeep Pragallapati (QUIC)" <quic_pragalla@...cinc.com>,
"sartgarg@...eaurora.org" <sartgarg@...eaurora.org>,
"nitirawa@...eaurora.org" <nitirawa@...eaurora.org>,
"sayalil@...eaurora.org" <sayalil@...eaurora.org>
Subject: RE: [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card err_stat sysfs
entry
Hi,
Thank you for suggestion .. will make the changes .
Thanks,
Sajida
-----Original Message-----
From: Ulf Hansson <ulf.hansson@...aro.org>
Sent: Thursday, December 2, 2021 1:35 PM
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Sajida Bhanu (Temp) (QUIC) <quic_c_sbhanu@...cinc.com>; riteshh@...eaurora.org; Asutosh Das (asd) <asutoshd@...cinc.com>; agross@...nel.org; bjorn.andersson@...aro.org; linux-mmc@...r.kernel.org; linux-arm-msm@...r.kernel.org; linux-kernel@...r.kernel.org; stummala@...eaurora.org; vbadigan@...eaurora.org; Ram Prakash Gupta (QUIC) <quic_rampraka@...cinc.com>; Pradeep Pragallapati (QUIC) <quic_pragalla@...cinc.com>; sartgarg@...eaurora.org; nitirawa@...eaurora.org; sayalil@...eaurora.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@...el.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@...cinc.com>
> > Sent: Friday, November 26, 2021 10:54 AM
> > To: Ulf Hansson <ulf.hansson@...aro.org>; Sajida Bhanu (Temp) (QUIC)
> > <quic_c_sbhanu@...cinc.com>
> > Cc: adrian.hunter@...el.com; riteshh@...eaurora.org; Asutosh Das
> > (asd) <asutoshd@...cinc.com>; agross@...nel.org;
> > bjorn.andersson@...aro.org; linux-mmc@...r.kernel.org;
> > linux-arm-msm@...r.kernel.org; linux-kernel@...r.kernel.org;
> > stummala@...eaurora.org; vbadigan@...eaurora.org; Ram Prakash Gupta
> > (QUIC) <quic_rampraka@...cinc.com>; Pradeep Pragallapati (QUIC)
> > <quic_pragalla@...cinc.com>; sartgarg@...eaurora.org;
> > nitirawa@...eaurora.org; sayalil@...eaurora.org
> > Subject: RE: [PATCH V1] mmc: sdhci-msm: Add eMMC and SD card
> > err_stat sysfs entry
> >
> >
> >
> > -----Original Message-----
> > From: Ulf Hansson <ulf.hansson@...aro.org>
> > Sent: Thursday, November 25, 2021 5:01 PM
> > To: Sajida Bhanu (Temp) (QUIC) <quic_c_sbhanu@...cinc.com>
> > Cc: adrian.hunter@...el.com; riteshh@...eaurora.org; Asutosh Das
> > (asd) <asutoshd@...cinc.com>; agross@...nel.org;
> > bjorn.andersson@...aro.org; linux-mmc@...r.kernel.org;
> > linux-arm-msm@...r.kernel.org; linux-kernel@...r.kernel.org;
> > stummala@...eaurora.org; vbadigan@...eaurora.org; Ram Prakash Gupta
> > (QUIC) <quic_rampraka@...cinc.com>; Pradeep Pragallapati (QUIC)
> > <quic_pragalla@...cinc.com>; sartgarg@...eaurora.org;
> > nitirawa@...eaurora.org; sayalil@...eaurora.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@...cinc.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@...cinc.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
Powered by blists - more mailing lists