From: Romain Izard <romain.izard.pro@gmail.com>
To: Chris Ball <chris@printf.net>,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org, Derek Simkowiak <derek@webtuner.tv>
Cc: Romain Izard <romain.izard.pro@gmail.com>
Subject: [PATCH v2] mmc: Allow forward compatibility for e⋅MMC
Date: Fri, 27 Jun 2014 10:51:07 +0200 [thread overview]
Message-ID: <1403859067-21142-1-git-send-email-romain.izard.pro@gmail.com> (raw)
In-Reply-To: <53AC65FF.1010301@webtuner.tv>
As stated by the e⋅MMC 5.0 specification, a chip should not be rejected
only because of the revision stated in the EXT_CSD_REV field of the
EXT_CSD register.
Remove the control on this value, the control of the CSD_STRUCTURE field
should be sufficient to reject future incompatible changes.
Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
---
drivers/mmc/core/mmc.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 1ab5f3a0af5b..ac9b8232133c 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -293,13 +293,12 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
}
}
+ /*
+ * The EXT_CSD format is meant to be forward compatible. As long
+ * as CSD_STRUCTURE does not change, all values for EXT_CSD_REV
+ * are authorized, see JEDEC JESD84-B50 section B.8.
+ */
card->ext_csd.rev = ext_csd[EXT_CSD_REV];
- if (card->ext_csd.rev > 7) {
- pr_err("%s: unrecognised EXT_CSD revision %d\n",
- mmc_hostname(card->host), card->ext_csd.rev);
- err = -EINVAL;
- goto out;
- }
card->ext_csd.raw_sectors[0] = ext_csd[EXT_CSD_SEC_CNT + 0];
card->ext_csd.raw_sectors[1] = ext_csd[EXT_CSD_SEC_CNT + 1];
--
1.9.1
next prev parent reply other threads:[~2014-06-27 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-25 19:28 Seeking correct git repo Derek Simkowiak
2014-06-26 1:08 ` Hsin-Hsiang Tseng
2014-06-26 9:35 ` Ulf Hansson
2014-06-26 18:27 ` Derek Simkowiak
2014-06-27 8:51 ` Romain Izard [this message]
2014-07-08 12:26 ` [PATCH v2] mmc: Allow forward compatibility for e⋅MMC 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=1403859067-21142-1-git-send-email-romain.izard.pro@gmail.com \
--to=romain.izard.pro@gmail.com \
--cc=chris@printf.net \
--cc=derek@webtuner.tv \
--cc=linux-mmc@vger.kernel.org \
--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).