linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-mmc <linux-mmc@vger.kernel.org>,
	Tomas Winkler <tomas.winkler@intel.com>,
	Roman Pen <r.peniaev@gmail.com>,
	Ben Gardiner <bengardiner@nanometrics.ca>
Subject: Re: [PATCH RFC 0/3] mmc: block: Fix tuning (by avoiding it) for RPMB
Date: Thu, 28 Apr 2016 10:21:27 +0300	[thread overview]
Message-ID: <5721B9F7.509@intel.com> (raw)
In-Reply-To: <1461245314-6282-1-git-send-email-adrian.hunter@intel.com>

cc a couple more people

On 21/04/16 16:28, Adrian Hunter wrote:
> Hi
> 
> The RPMB partition only allows certain commands.  In particular,
> the tuning command (CMD21) is not allowed -  refer JEDEC eMMC
> standard v5.1 section 6.2.2 Command restrictions.
> 
> That means commands will begin failing if re-tuning is needed
> while switched to the RPMB partition.
> 
> Here are 4 options to fix the problem:
> 
> 
> 1. The approach taken by this patch set:
> 
> To avoid tuning for RPMB, switch to High Speed mode from HS200
> or HS400 mode if re-tuning has been enabled.  And switch back
> when leaving RPMB.
> 
> Advantages: Directly does what needs to be done.
> 
> Disadvantages: Assumes the mode switching will work.
> 
> 
> 2. Same as 1 but disable the tuning modes by removing them from
> card->mmc_avail_type and doing a full mmc_reset().
> 
> Advantages: Simpler to program
> 
> Disadvantages: Doing a full reset is slower.  Doing a full reset
> is not an expected consequence of accessing RPMB.
> 
> 
> 3. Simply disable re-tuning and attempt to recover from any errors.
> 
> Disadvantages: Due to the interdependent nature of RPMB reads/writes
> it might not be possible to recover without returning an error to the
> RPMB user.  Also it would be difficult to test if the recovery actually
> worked in all cases.
> 
> 
> 4. Do a partiton switch as part of re-tuning.
> 
> Disadvantages: Makes re-tuning more complicated.  Would require moving
> the control of partition switching into the core.  CRC errors arising
> from the need to re-tune might break the interdependent nature of RPMB
> operations.
> 
> 
> As a final note, if a solution is found then we might be able to revert
> commit 4e93b9a6abc0 ("mmc: card: Don't access RPMB partitions for normal
> read/write").
> 
> 
> Adrian Hunter (3):
>       mmc: mmc: Factor out mmc_hs200_to_hs()
>       mmc: mmc: Factor out mmc_hs400_to_hs() and __mmc_hs_to_hs200()
>       mmc: block: Fix tuning (by avoiding it) for RPMB
> 
>  drivers/mmc/card/block.c |  36 +++++++++++
>  drivers/mmc/core/mmc.c   | 156 ++++++++++++++++++++++++++++++++++++++++++-----
>  include/linux/mmc/card.h |   2 +-
>  include/linux/mmc/core.h |   3 +
>  include/linux/mmc/host.h |   5 ++
>  5 files changed, 186 insertions(+), 16 deletions(-)
> 
> 
> Regards
> Adrian
> 


  parent reply	other threads:[~2016-04-28  7:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 13:28 [PATCH RFC 0/3] mmc: block: Fix tuning (by avoiding it) for RPMB Adrian Hunter
2016-04-21 13:28 ` [PATCH RFC 1/3] mmc: mmc: Factor out mmc_hs200_to_hs() Adrian Hunter
2016-04-21 13:28 ` [PATCH RFC 2/3] mmc: mmc: Factor out mmc_hs400_to_hs() and __mmc_hs_to_hs200() Adrian Hunter
2016-04-21 13:28 ` [PATCH RFC 3/3] mmc: block: Fix tuning (by avoiding it) for RPMB Adrian Hunter
2016-04-28 10:34   ` Ulf Hansson
2016-04-28 11:02     ` Adrian Hunter
2016-04-28 11:46       ` Ulf Hansson
2016-04-28 13:02         ` Adrian Hunter
2016-05-02  8:24           ` Ulf Hansson
2016-05-02  9:31             ` Adrian Hunter
2016-05-02 11:14               ` Ulf Hansson
2016-04-28  7:21 ` Adrian Hunter [this message]
2016-05-02 21:19   ` [PATCH RFC 0/3] " Winkler, Tomas

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=5721B9F7.509@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=bengardiner@nanometrics.ca \
    --cc=linux-mmc@vger.kernel.org \
    --cc=r.peniaev@gmail.com \
    --cc=tomas.winkler@intel.com \
    --cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).