All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
@ 2011-09-08  5:59 Seungwon Jeon
  2011-09-08  6:39 ` Kyungmin Park
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Seungwon Jeon @ 2011-09-08  5:59 UTC (permalink / raw)
  To: linux-mmc; +Cc: cjb, linux-samsung-soc, kgene.kim, dh.han, Seungwon Jeon

Erase unit size of high capacity is multiple of 512KiB not 1024KiB.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.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 b148bb1..7991ecf 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -332,7 +332,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
 		card->ext_csd.hc_erase_timeout = 300 *
 			ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT];
 		card->ext_csd.hc_erase_size =
-			ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 10;
+			ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 9;

 		card->ext_csd.rel_sectors = ext_csd[EXT_CSD_REL_WR_SEC_C];

--
1.7.0.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-08  5:59 [PATCH] mmc: core: Fix the incorrect calculation for erase unit size Seungwon Jeon
@ 2011-09-08  6:39 ` Kyungmin Park
  2011-09-08 13:19 ` Chris Ball
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Kyungmin Park @ 2011-09-08  6:39 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, cjb, linux-samsung-soc, kgene.kim, dh.han

Acked-by: Kyungmin Park <kyungmin.park@samsung.com>

On Thu, Sep 8, 2011 at 2:59 PM, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Erase unit size of high capacity is multiple of 512KiB not 1024KiB.
>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.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 b148bb1..7991ecf 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -332,7 +332,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
>                card->ext_csd.hc_erase_timeout = 300 *
>                        ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT];
>                card->ext_csd.hc_erase_size =
> -                       ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 10;
> +                       ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 9;
>
>                card->ext_csd.rel_sectors = ext_csd[EXT_CSD_REL_WR_SEC_C];
>
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-08  5:59 [PATCH] mmc: core: Fix the incorrect calculation for erase unit size Seungwon Jeon
  2011-09-08  6:39 ` Kyungmin Park
@ 2011-09-08 13:19 ` Chris Ball
  2011-09-14  2:27   ` Seungwon Jeon
  2011-09-08 20:27 ` J Freyensee
  2011-09-11 17:32 ` ajh mls
  3 siblings, 1 reply; 8+ messages in thread
From: Chris Ball @ 2011-09-08 13:19 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, linux-samsung-soc, kgene.kim, dh.han

Hi,

On Thu, Sep 08 2011, Seungwon Jeon wrote:
> Erase unit size of high capacity is multiple of 512KiB not 1024KiB.

Could we have some more info, please?  What are the visible symptoms
of the erase unit size being incorrect, how did you realize this was
a problem, should this patch be applied to stable@, etc.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-08  5:59 [PATCH] mmc: core: Fix the incorrect calculation for erase unit size Seungwon Jeon
  2011-09-08  6:39 ` Kyungmin Park
  2011-09-08 13:19 ` Chris Ball
@ 2011-09-08 20:27 ` J Freyensee
  2011-09-11 17:32 ` ajh mls
  3 siblings, 0 replies; 8+ messages in thread
From: J Freyensee @ 2011-09-08 20:27 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, cjb, linux-samsung-soc, kgene.kim, dh.han

On 09/07/2011 10:59 PM, Seungwon Jeon wrote:
> Erase unit size of high capacity is multiple of 512KiB not 1024KiB.

I'm just wondering, what are these patches based off of?  I have not 
been able to connect to anything hosted by kernel.org since I came back 
from vacation due to the security breach on kernel.org.

>
> Signed-off-by: Seungwon Jeon<tgih.jun@samsung.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 b148bb1..7991ecf 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -332,7 +332,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)
>   		card->ext_csd.hc_erase_timeout = 300 *
>   			ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT];
>   		card->ext_csd.hc_erase_size =
> -			ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]<<  10;
> +			ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE]<<  9;
>
>   		card->ext_csd.rel_sectors = ext_csd[EXT_CSD_REL_WR_SEC_C];
>
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
J (James/Jay) Freyensee
Storage Technology Group
Intel Corporation

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-08  5:59 [PATCH] mmc: core: Fix the incorrect calculation for erase unit size Seungwon Jeon
                   ` (2 preceding siblings ...)
  2011-09-08 20:27 ` J Freyensee
@ 2011-09-11 17:32 ` ajh mls
  3 siblings, 0 replies; 8+ messages in thread
From: ajh mls @ 2011-09-11 17:32 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, cjb, linux-samsung-soc, kgene.kim, dh.han

On 08/09/2011, Seungwon Jeon <tgih.jun@samsung.com> wrote:
> Erase unit size of high capacity is multiple of 512KiB not 1024KiB.

Isn't hc_erase_size in sectors so 512 x 1024 / 512 = 1024 and so the
code is correct.

>
> Signed-off-by: Seungwon Jeon <tgih.jun@samsung.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 b148bb1..7991ecf 100644
> --- a/drivers/mmc/core/mmc.c
> +++ b/drivers/mmc/core/mmc.c
> @@ -332,7 +332,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8
> *ext_csd)
>  		card->ext_csd.hc_erase_timeout = 300 *
>  			ext_csd[EXT_CSD_ERASE_TIMEOUT_MULT];
>  		card->ext_csd.hc_erase_size =
> -			ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 10;
> +			ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] << 9;
>
>  		card->ext_csd.rel_sectors = ext_csd[EXT_CSD_REL_WR_SEC_C];
>
> --
> 1.7.0.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-08 13:19 ` Chris Ball
@ 2011-09-14  2:27   ` Seungwon Jeon
  2011-09-14  2:29     ` Chris Ball
  0 siblings, 1 reply; 8+ messages in thread
From: Seungwon Jeon @ 2011-09-14  2:27 UTC (permalink / raw)
  To: 'Chris Ball'; +Cc: linux-mmc, linux-samsung-soc, kgene.kim, dh.han

Chris Ball wrote:
> 
> Hi,
> 
> On Thu, Sep 08 2011, Seungwon Jeon wrote:
> > Erase unit size of high capacity is multiple of 512KiB not 1024KiB.
> 
> Could we have some more info, please?  What are the visible symptoms
> of the erase unit size being incorrect, how did you realize this was
> a problem, should this patch be applied to stable@, etc.

It is mentioned from eMMC Spec.
Erase unit size is defined in 512Kbyte * HC_ERASE_GRP_SIZE(EXT_CSD[224]).

Thanks.

> 
> Thanks,
> 
> - Chris.
> --
> Chris Ball   <cjb@laptop.org>   <http://printf.net/>
> One Laptop Per Child

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-14  2:27   ` Seungwon Jeon
@ 2011-09-14  2:29     ` Chris Ball
  2011-09-14  3:50       ` Seungwon Jeon
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Ball @ 2011-09-14  2:29 UTC (permalink / raw)
  To: Seungwon Jeon; +Cc: linux-mmc, linux-samsung-soc, kgene.kim, dh.han

Hi,

On Tue, Sep 13 2011, Seungwon Jeon wrote:
>> On Thu, Sep 08 2011, Seungwon Jeon wrote:
>> > Erase unit size of high capacity is multiple of 512KiB not 1024KiB.
>> 
>> Could we have some more info, please?  What are the visible symptoms
>> of the erase unit size being incorrect, how did you realize this was
>> a problem, should this patch be applied to stable@, etc.
>
> It is mentioned from eMMC Spec.
> Erase unit size is defined in 512Kbyte * HC_ERASE_GRP_SIZE(EXT_CSD[224]).

You haven't answered any of the other questions I asked, though.

Thanks,

- Chris.
-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH] mmc: core: Fix the incorrect calculation for erase unit size.
  2011-09-14  2:29     ` Chris Ball
@ 2011-09-14  3:50       ` Seungwon Jeon
  0 siblings, 0 replies; 8+ messages in thread
From: Seungwon Jeon @ 2011-09-14  3:50 UTC (permalink / raw)
  To: 'Chris Ball'; +Cc: linux-mmc, linux-samsung-soc, kgene.kim, dh.han

Chris Ball wrote:
> 
> Hi,
> 
> On Tue, Sep 13 2011, Seungwon Jeon wrote:
> >> On Thu, Sep 08 2011, Seungwon Jeon wrote:
> >> > Erase unit size of high capacity is multiple of 512KiB not 1024KiB.
> >>
> >> Could we have some more info, please?  What are the visible symptoms
> >> of the erase unit size being incorrect, how did you realize this was
> >> a problem, should this patch be applied to stable@, etc.
> >
> > It is mentioned from eMMC Spec.
> > Erase unit size is defined in 512Kbyte * HC_ERASE_GRP_SIZE(EXT_CSD[224]).
> 
> You haven't answered any of the other questions I asked, though.

I didn't catch symptoms you expect. But it seems like plain.
I just noticed the difference with spec.

Best regards,
Seungwon Jeon.

> 
> Thanks,
> 
> - Chris.
> --
> Chris Ball   <cjb@laptop.org>   <http://printf.net/>
> One Laptop Per Child

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-14  3:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08  5:59 [PATCH] mmc: core: Fix the incorrect calculation for erase unit size Seungwon Jeon
2011-09-08  6:39 ` Kyungmin Park
2011-09-08 13:19 ` Chris Ball
2011-09-14  2:27   ` Seungwon Jeon
2011-09-14  2:29     ` Chris Ball
2011-09-14  3:50       ` Seungwon Jeon
2011-09-08 20:27 ` J Freyensee
2011-09-11 17:32 ` ajh mls

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.