* [PATCH] mmc: core: expose RPMB partition only for CMD23 capable host
@ 2013-01-25 11:30 Balaji T K
2013-01-25 12:16 ` Peter Ujfalusi
0 siblings, 1 reply; 3+ messages in thread
From: Balaji T K @ 2013-01-25 11:30 UTC (permalink / raw)
To: linux-mmc, cjb; +Cc: loic.pallardy-ext, peter.ujfalusi, Balaji T K
SET_BLOCK_COUNT CMD23 is needed for all access to RPMB partition.
If block count is not set by CMD23, all subsequent read/write commands
fail as per eMMC specification. So, If the host does not support CMD23,
do not expose RPMB partition.
Accessing RPMB partition can cause hang / huge delay
for host which do not support CMD23.
Signed-off-by: Balaji T K <balajitk@ti.com>
Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/mmc/core/mmc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index e6e3911..089e8ea 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -496,7 +496,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
* RPMB regions are defined in multiples of 128K.
*/
card->ext_csd.raw_rpmb_size_mult = ext_csd[EXT_CSD_RPMB_MULT];
- if (ext_csd[EXT_CSD_RPMB_MULT]) {
+ if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_cmd23(card->host)) {
mmc_part_add(card, ext_csd[EXT_CSD_RPMB_MULT] << 17,
EXT_CSD_PART_CONFIG_ACC_RPMB,
"rpmb", 0, false,
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: core: expose RPMB partition only for CMD23 capable host
2013-01-25 11:30 [PATCH] mmc: core: expose RPMB partition only for CMD23 capable host Balaji T K
@ 2013-01-25 12:16 ` Peter Ujfalusi
2013-01-28 22:28 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: Peter Ujfalusi @ 2013-01-25 12:16 UTC (permalink / raw)
To: Balaji T K; +Cc: linux-mmc, cjb, loic.pallardy-ext
On 01/25/2013 12:30 PM, Balaji T K wrote:
> SET_BLOCK_COUNT CMD23 is needed for all access to RPMB partition.
> If block count is not set by CMD23, all subsequent read/write commands
> fail as per eMMC specification. So, If the host does not support CMD23,
> do not expose RPMB partition.
>
> Accessing RPMB partition can cause hang / huge delay
> for host which do not support CMD23.
Can this patch make it's way to 3.8? Without this patch my OMAP4 board's eMMC
is not accessible causing blkid (via udev) to time out and slowing down the
boot process.
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
> Signed-off-by: Balaji T K <balajitk@ti.com>
> Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> drivers/mmc/core/mmc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
> index e6e3911..089e8ea 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -496,7 +496,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
> * RPMB regions are defined in multiples of 128K.
> */
> card->ext_csd.raw_rpmb_size_mult = ext_csd[EXT_CSD_RPMB_MULT];
> - if (ext_csd[EXT_CSD_RPMB_MULT]) {
> + if (ext_csd[EXT_CSD_RPMB_MULT] && mmc_host_cmd23(card->host)) {
> mmc_part_add(card, ext_csd[EXT_CSD_RPMB_MULT] << 17,
> EXT_CSD_PART_CONFIG_ACC_RPMB,
> "rpmb", 0, false,
>
--
Péter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: core: expose RPMB partition only for CMD23 capable host
2013-01-25 12:16 ` Peter Ujfalusi
@ 2013-01-28 22:28 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2013-01-28 22:28 UTC (permalink / raw)
To: Peter Ujfalusi; +Cc: Balaji T K, linux-mmc, loic.pallardy-ext
Hi,
On Fri, Jan 25 2013, Peter Ujfalusi wrote:
> On 01/25/2013 12:30 PM, Balaji T K wrote:
>> SET_BLOCK_COUNT CMD23 is needed for all access to RPMB partition.
>> If block count is not set by CMD23, all subsequent read/write commands
>> fail as per eMMC specification. So, If the host does not support CMD23,
>> do not expose RPMB partition.
>>
>> Accessing RPMB partition can cause hang / huge delay
>> for host which do not support CMD23.
>
> Can this patch make it's way to 3.8? Without this patch my OMAP4 board's eMMC
> is not accessible causing blkid (via udev) to time out and slowing down the
> boot process.
>
> Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Thanks, pushed to mmc-next for 3.8.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-28 22:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-25 11:30 [PATCH] mmc: core: expose RPMB partition only for CMD23 capable host Balaji T K
2013-01-25 12:16 ` Peter Ujfalusi
2013-01-28 22:28 ` Chris Ball
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).