public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
To: "Jorge Ramirez-Ortiz, Foundries" <jorge@foundries.io>
Cc: Avri Altman <Avri.Altman@wdc.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"ulf.hansson@linaro.org" <ulf.hansson@linaro.org>,
	"christian.loehle@arm.com" <christian.loehle@arm.com>,
	"jinpu.wang@ionos.com" <jinpu.wang@ionos.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"yibin.ding@unisoc.com" <yibin.ding@unisoc.com>,
	"victor.shih@genesyslogic.com.tw"
	<victor.shih@genesyslogic.com.tw>,
	"asuk4.q@gmail.com" <asuk4.q@gmail.com>,
	"hkallweit1@gmail.com" <hkallweit1@gmail.com>,
	"yangyingliang@huawei.com" <yangyingliang@huawei.com>,
	"yebin10@huawei.com" <yebin10@huawei.com>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: rpmb: do not force a retune before RPMB switch
Date: Tue, 5 Dec 2023 17:10:02 +0100	[thread overview]
Message-ID: <ZW9LWrlYa2+lUcVc@trax> (raw)
In-Reply-To: <ZW4W6aZq+0DCmVTi@trax>

On 04/12/23 19:14:01, Jorge Ramirez-Ortiz, Foundries wrote:
> On 04/12/23 17:58:45, Avri Altman wrote:
> > >
> > > Requesting a retune before switching to the RPMB partition has been
> > > observed to cause CRC errors on the RPMB reads (-EILSEQ).
> > >
> > > Since RPMB reads can not be retried, the clients would be directly affected by
> > > the errors.
> > >
> > > This commit disables the request prior to RPMB switching while allowing the
> > > pause interface to still request a retune before the pause for other use cases.
> > >
> > > This was verified with the sdhci-of-arasan driver (ZynqMP) configured for
> > > HS200 using two separate eMMC cards (DG4064 and 064GB2). In both cases,
> > > the error was easy to reproduce triggering every few tenths of reads.
> > >
> > > Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
> > > ---
> > >  drivers/mmc/core/block.c | 2 +-
> > >  drivers/mmc/core/host.c  | 7 ++++---
> > >  drivers/mmc/core/host.h  | 2 +-
> > >  3 files changed, 6 insertions(+), 5 deletions(-)
> > >
> > > diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index
> > > f9a5cffa64b1..1d69078ad9b2 100644
> > > --- a/drivers/mmc/core/block.c
> > > +++ b/drivers/mmc/core/block.c
> > > @@ -859,7 +859,7 @@ static int mmc_blk_part_switch_pre(struct mmc_card
> > > *card,
> > >                         if (ret)
> > >                                 return ret;
> > >                 }
> > > -               mmc_retune_pause(card->host);
> > > +               mmc_retune_pause(card->host, false);
> > >         }
> > >
> > >         return ret;
> > > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c index
> > > 096093f7be00..a9b95aaa2235 100644
> > > --- a/drivers/mmc/core/host.c
> > > +++ b/drivers/mmc/core/host.c
> > > @@ -119,13 +119,14 @@ void mmc_retune_enable(struct mmc_host *host)
> > >
> > >  /*
> > >   * Pause re-tuning for a small set of operations.  The pause begins after the
> > > - * next command and after first doing re-tuning.
> > > + * next command and, if retune is set, after first doing re-tuning.
> > >   */
> > > -void mmc_retune_pause(struct mmc_host *host)
> > > +void mmc_retune_pause(struct mmc_host *host, bool retune)
> > >  {
> > Since mmc_blk_part_switch_pre is the only caller of mmc_retune_pause,
> > How about just move those lines into it?
>
> +1 from me
>
> I wasnt sure if there was some other plan for mmc_retune_pause in the
> future hence why I didnt remove it and extended it instead.
>
> Should I wait for Adrian's confirmation or just go ahead?.

just making sure this is not falling through the cracks.

  reply	other threads:[~2023-12-05 16:10 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-04 15:01 [PATCH] mmc: rpmb: do not force a retune before RPMB switch Jorge Ramirez-Ortiz
2023-12-04 16:22 ` Avri Altman
2023-12-04 17:58 ` Avri Altman
2023-12-04 18:14   ` Jorge Ramirez-Ortiz, Foundries
2023-12-05 16:10     ` Jorge Ramirez-Ortiz, Foundries [this message]
2023-12-05 20:12 ` Adrian Hunter
2023-12-05 20:14   ` Adrian Hunter
2023-12-06  7:02   ` Avri Altman
2023-12-06 10:00     ` Jorge Ramirez-Ortiz, Foundries
2023-12-11  8:00       ` Jorge Ramirez-Ortiz, Foundries
2023-12-11 10:25         ` Adrian Hunter
2023-12-11 11:06           ` Jorge Ramirez-Ortiz, Foundries
2023-12-11 11:32             ` Adrian Hunter
2023-12-11 15:05               ` Jorge Ramirez-Ortiz, Foundries
2023-12-14  9:15                 ` Adrian Hunter
2023-12-14 11:16                   ` Jorge Ramirez-Ortiz, Foundries
2024-01-02 10:41         ` Jorge Ramirez-Ortiz, Foundries
2024-01-02 19:01           ` Adrian Hunter
2024-01-02 22:01             ` Jorge Ramirez-Ortiz, Foundries
2024-01-03  8:03               ` Adrian Hunter
2024-01-03  9:20                 ` Jorge Ramirez-Ortiz, Foundries
2024-01-04 18:34                   ` Adrian Hunter
2024-01-05  8:49                     ` Jorge Ramirez-Ortiz, Foundries
2024-01-05 13:00                       ` Michal Simek
2023-12-11  8:03     ` Adrian Hunter
2024-01-02 19:02 ` Adrian Hunter
2024-01-03  8:08   ` Adrian Hunter
  -- strict thread matches above, loose matches on Subject: below --
2023-12-04 17:22 Jorge Ramirez-Ortiz
2023-12-04 17:52 ` Christian Loehle
2023-12-04 18:10   ` Jorge Ramirez-Ortiz, Foundries
2023-12-11 16:17 ` Adrian Hunter
2023-12-11 16:55 Jorge Ramirez-Ortiz
2024-01-03  8:08 ` Adrian Hunter
2024-01-03 10:35 ` Ulf Hansson

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=ZW9LWrlYa2+lUcVc@trax \
    --to=jorge@foundries.io \
    --cc=Avri.Altman@wdc.com \
    --cc=adrian.hunter@intel.com \
    --cc=asuk4.q@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=beanhuo@micron.com \
    --cc=christian.loehle@arm.com \
    --cc=hkallweit1@gmail.com \
    --cc=jinpu.wang@ionos.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=victor.shih@genesyslogic.com.tw \
    --cc=yangyingliang@huawei.com \
    --cc=yebin10@huawei.com \
    --cc=yibin.ding@unisoc.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox